Spaces:
Running
Running
Commit
·
7d6b1f5
1
Parent(s):
722a50c
working
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ WORKFLOW_PATH = SCRIPT_DIR / "wani2v.json"
|
|
23 |
loras = [
|
24 |
{
|
25 |
#I suggest it to be a gif instead of an mp4!
|
26 |
-
"image": "https://huggingface.co/Remade-AI/Squish/resolve/main/
|
27 |
#This is an id you can send to your backend, obviously you can change it
|
28 |
"id": "06ce6840-f976-4963-9644-b6cf7f323f90",
|
29 |
#This is the title that is shown on the front end
|
@@ -32,13 +32,13 @@ loras = [
|
|
32 |
"example_prompt": "In the video, a miniature rodent is presented. The rodent is held in a person's hands. The person then presses on the rodent, causing a sq41sh squish effect. The person keeps pressing down on the rodent, further showing the sq41sh squish effect.",
|
33 |
},
|
34 |
{
|
35 |
-
"image": "https://huggingface.co/Remade-AI/Rotate/resolve/main/example_videos/
|
36 |
"id": "4ac08cfa-841e-4aa9-9022-c3fc80fb6ef4",
|
37 |
"title": "Rotate",
|
38 |
"example_prompt": "The video shows an elderly Asian man's head and shoulders with blurred background, performing a r0t4tion 360 degrees rotation.",
|
39 |
},
|
40 |
{
|
41 |
-
"image": "https://huggingface.co/Remade-AI/Cakeify/resolve/main/
|
42 |
"id": "b05c1dc7-a71c-4d24-b512-4877a12dea7e",
|
43 |
"title": "Cakeify",
|
44 |
"example_prompt": "The video opens on a woman. A knife, held by a hand, is coming into frame and hovering over the woman. The knife then begins cutting into the woman to c4k3 cakeify it. As the knife slices the woman open, the inside of the woman is revealed to be cake with chocolate layers. The knife cuts through and the contents of the woman are revealed."
|
@@ -49,6 +49,7 @@ loras = [
|
|
49 |
|
50 |
|
51 |
|
|
|
52 |
]
|
53 |
|
54 |
# Initialize Supabase client with async support
|
@@ -319,53 +320,61 @@ css = '''
|
|
319 |
.styler{--form-gap-width: 0px !important}
|
320 |
#progress{height:30px}
|
321 |
#progress .generating{display:none}
|
322 |
-
.progress-container {width: 100%;height: 30px;background-color: #
|
323 |
-
.progress-bar {height: 100%;background-color: #
|
324 |
-
.progress-text {position: absolute;width: 100%;text-align: center;top: 50%;left: 0;transform: translateY(-50%);color: #
|
325 |
-
.refresh-warning {color: #
|
326 |
|
327 |
-
/*
|
328 |
.discord-banner {
|
329 |
-
background: linear-gradient(135deg, #
|
330 |
-
color:
|
331 |
padding: 20px;
|
332 |
border-radius: 12px;
|
333 |
margin: 15px 0;
|
334 |
text-align: center;
|
335 |
-
box-shadow: 0 4px
|
336 |
}
|
337 |
.discord-banner h3 {
|
338 |
margin-top: 0;
|
339 |
font-size: 1.5em;
|
340 |
-
text-shadow: 0
|
|
|
|
|
|
|
|
|
|
|
341 |
}
|
342 |
.discord-banner a {
|
343 |
display: inline-block;
|
344 |
-
background-color:
|
345 |
color: #5865F2;
|
346 |
text-decoration: none;
|
347 |
font-weight: bold;
|
348 |
-
padding:
|
349 |
-
border-radius:
|
350 |
margin-top: 10px;
|
351 |
-
transition: all 0.
|
352 |
-
box-shadow: 0 2px
|
|
|
353 |
}
|
354 |
.discord-banner a:hover {
|
355 |
-
transform: translateY(-
|
356 |
-
box-shadow: 0
|
|
|
357 |
}
|
358 |
.discord-feature {
|
359 |
-
background-color: #
|
360 |
-
border-left: 4px solid #
|
361 |
padding: 12px 15px;
|
362 |
margin: 10px 0;
|
363 |
border-radius: 0 8px 8px 0;
|
364 |
-
box-shadow: 0 2px 4px rgba(0,0,0,0.
|
|
|
365 |
}
|
366 |
.discord-feature-title {
|
367 |
font-weight: bold;
|
368 |
-
color: #
|
369 |
}
|
370 |
.discord-locked {
|
371 |
opacity: 0.7;
|
@@ -378,24 +387,28 @@ css = '''
|
|
378 |
top: 50%;
|
379 |
left: 50%;
|
380 |
transform: translate(-50%, -50%);
|
381 |
-
background: rgba(
|
382 |
color: white;
|
383 |
padding: 5px 10px;
|
384 |
border-radius: 20px;
|
385 |
white-space: nowrap;
|
386 |
font-size: 0.9em;
|
387 |
font-weight: bold;
|
388 |
-
box-shadow: 0 2px 4px rgba(0,0,0,0.
|
389 |
}
|
390 |
.discord-benefits-list {
|
391 |
text-align: left;
|
392 |
display: inline-block;
|
393 |
margin: 10px 0;
|
|
|
394 |
}
|
395 |
.discord-benefits-list li {
|
396 |
-
margin:
|
397 |
position: relative;
|
398 |
-
padding-left:
|
|
|
|
|
|
|
399 |
}
|
400 |
.discord-benefits-list li::before {
|
401 |
content: "✨";
|
@@ -407,15 +420,27 @@ css = '''
|
|
407 |
opacity: 0.6;
|
408 |
cursor: not-allowed;
|
409 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
410 |
'''
|
411 |
|
412 |
-
with gr.Blocks(css=css) as demo:
|
413 |
selected_index = gr.State(None)
|
414 |
current_generation_id = gr.State(None)
|
415 |
|
416 |
gr.Markdown("# Remade AI - Wan 2.1 I2V effects LoRAs ")
|
417 |
|
418 |
-
# Discord banner at the top
|
419 |
discord_banner = gr.HTML(
|
420 |
"""<div class="discord-banner">
|
421 |
<h3>✨ Unlock Premium Features! ✨</h3>
|
@@ -439,7 +464,7 @@ with gr.Blocks(css=css) as demo:
|
|
439 |
object_fit="contain"
|
440 |
)
|
441 |
|
442 |
-
# Discord feature callout for LoRAs
|
443 |
gr.HTML(
|
444 |
"""<div class="discord-feature">
|
445 |
<span class="discord-feature-title">✨ Discord Members:</span> Access 100+ additional LoRAs beyond these 3 samples!
|
@@ -468,31 +493,26 @@ with gr.Blocks(css=css) as demo:
|
|
468 |
button = gr.Button("Generate", variant="primary", elem_id="gen_btn")
|
469 |
audio_button = gr.Button("Add Audio 🔒", interactive=False)
|
470 |
|
471 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
472 |
gr.HTML(
|
473 |
"""<div class="discord-feature">
|
474 |
<span class="discord-feature-title">⚡ Discord Members:</span> Enjoy priority queue with faster generation times!
|
475 |
</div>"""
|
476 |
)
|
477 |
|
478 |
-
with gr.Column(scale=1):
|
479 |
progress_bar = gr.Markdown(elem_id="progress", visible=False)
|
480 |
output = gr.Video(interactive=False, label="Output video")
|
481 |
|
482 |
-
|
483 |
-
gr.HTML(
|
484 |
-
"""<div class="discord-banner" style="margin-top: 20px;">
|
485 |
-
<h3>Join our Discord to unlock:</h3>
|
486 |
-
<ul class="discord-benefits-list">
|
487 |
-
<li>Longer video durations (up to 10 seconds)</li>
|
488 |
-
<li>100+ creative LoRAs to choose from</li>
|
489 |
-
<li>Audio generation features</li>
|
490 |
-
<li>Priority queue with faster generation</li>
|
491 |
-
<li>Community support and inspiration</li>
|
492 |
-
</ul>
|
493 |
-
<a href="https://discord.gg/remade" target="_blank">Join Discord Now</a>
|
494 |
-
</div>"""
|
495 |
-
)
|
496 |
|
497 |
gallery.select(
|
498 |
update_selection,
|
|
|
23 |
loras = [
|
24 |
{
|
25 |
#I suggest it to be a gif instead of an mp4!
|
26 |
+
"image": "https://huggingface.co/Remade-AI/Squish/resolve/main/example_gifs/person_squish.gif",
|
27 |
#This is an id you can send to your backend, obviously you can change it
|
28 |
"id": "06ce6840-f976-4963-9644-b6cf7f323f90",
|
29 |
#This is the title that is shown on the front end
|
|
|
32 |
"example_prompt": "In the video, a miniature rodent is presented. The rodent is held in a person's hands. The person then presses on the rodent, causing a sq41sh squish effect. The person keeps pressing down on the rodent, further showing the sq41sh squish effect.",
|
33 |
},
|
34 |
{
|
35 |
+
"image": "https://huggingface.co/Remade-AI/Rotate/resolve/main/example_videos/chair-rotate.gif",
|
36 |
"id": "4ac08cfa-841e-4aa9-9022-c3fc80fb6ef4",
|
37 |
"title": "Rotate",
|
38 |
"example_prompt": "The video shows an elderly Asian man's head and shoulders with blurred background, performing a r0t4tion 360 degrees rotation.",
|
39 |
},
|
40 |
{
|
41 |
+
"image": "https://huggingface.co/Remade-AI/Cakeify/resolve/main/example_gifs/timberland_cakeify.gif",
|
42 |
"id": "b05c1dc7-a71c-4d24-b512-4877a12dea7e",
|
43 |
"title": "Cakeify",
|
44 |
"example_prompt": "The video opens on a woman. A knife, held by a hand, is coming into frame and hovering over the woman. The knife then begins cutting into the woman to c4k3 cakeify it. As the knife slices the woman open, the inside of the woman is revealed to be cake with chocolate layers. The knife cuts through and the contents of the woman are revealed."
|
|
|
49 |
|
50 |
|
51 |
|
52 |
+
|
53 |
]
|
54 |
|
55 |
# Initialize Supabase client with async support
|
|
|
320 |
.styler{--form-gap-width: 0px !important}
|
321 |
#progress{height:30px}
|
322 |
#progress .generating{display:none}
|
323 |
+
.progress-container {width: 100%;height: 30px;background-color: #2a2a2a;border-radius: 15px;overflow: hidden;margin-bottom: 20px;position: relative;}
|
324 |
+
.progress-bar {height: 100%;background-color: #7289DA;width: calc(var(--current) / var(--total) * 100%);transition: width 0.5s ease-in-out}
|
325 |
+
.progress-text {position: absolute;width: 100%;text-align: center;top: 50%;left: 0;transform: translateY(-50%);color: #ffffff;font-weight: bold;}
|
326 |
+
.refresh-warning {color: #ff7675;font-weight: bold;text-align: center;margin-top: 5px;}
|
327 |
|
328 |
+
/* Dark mode Discord styling */
|
329 |
.discord-banner {
|
330 |
+
background: linear-gradient(135deg, #7289DA 0%, #5865F2 100%);
|
331 |
+
color: #ffffff;
|
332 |
padding: 20px;
|
333 |
border-radius: 12px;
|
334 |
margin: 15px 0;
|
335 |
text-align: center;
|
336 |
+
box-shadow: 0 4px 8px rgba(0,0,0,0.3);
|
337 |
}
|
338 |
.discord-banner h3 {
|
339 |
margin-top: 0;
|
340 |
font-size: 1.5em;
|
341 |
+
text-shadow: 0 2px 4px rgba(0,0,0,0.3);
|
342 |
+
color: #ffffff;
|
343 |
+
}
|
344 |
+
.discord-banner p {
|
345 |
+
color: #ffffff;
|
346 |
+
margin-bottom: 15px;
|
347 |
}
|
348 |
.discord-banner a {
|
349 |
display: inline-block;
|
350 |
+
background-color: #ffffff;
|
351 |
color: #5865F2;
|
352 |
text-decoration: none;
|
353 |
font-weight: bold;
|
354 |
+
padding: 10px 20px;
|
355 |
+
border-radius: 24px;
|
356 |
margin-top: 10px;
|
357 |
+
transition: all 0.3s ease;
|
358 |
+
box-shadow: 0 2px 8px rgba(0,0,0,0.3);
|
359 |
+
border: none;
|
360 |
}
|
361 |
.discord-banner a:hover {
|
362 |
+
transform: translateY(-3px);
|
363 |
+
box-shadow: 0 6px 12px rgba(0,0,0,0.4);
|
364 |
+
background-color: #f2f2f2;
|
365 |
}
|
366 |
.discord-feature {
|
367 |
+
background-color: #2a2a2a;
|
368 |
+
border-left: 4px solid #7289DA;
|
369 |
padding: 12px 15px;
|
370 |
margin: 10px 0;
|
371 |
border-radius: 0 8px 8px 0;
|
372 |
+
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
|
373 |
+
color: #e0e0e0;
|
374 |
}
|
375 |
.discord-feature-title {
|
376 |
font-weight: bold;
|
377 |
+
color: #7289DA;
|
378 |
}
|
379 |
.discord-locked {
|
380 |
opacity: 0.7;
|
|
|
387 |
top: 50%;
|
388 |
left: 50%;
|
389 |
transform: translate(-50%, -50%);
|
390 |
+
background: rgba(114,137,218,0.9);
|
391 |
color: white;
|
392 |
padding: 5px 10px;
|
393 |
border-radius: 20px;
|
394 |
white-space: nowrap;
|
395 |
font-size: 0.9em;
|
396 |
font-weight: bold;
|
397 |
+
box-shadow: 0 2px 4px rgba(0,0,0,0.3);
|
398 |
}
|
399 |
.discord-benefits-list {
|
400 |
text-align: left;
|
401 |
display: inline-block;
|
402 |
margin: 10px 0;
|
403 |
+
color: #ffffff;
|
404 |
}
|
405 |
.discord-benefits-list li {
|
406 |
+
margin: 10px 0;
|
407 |
position: relative;
|
408 |
+
padding-left: 28px;
|
409 |
+
color: #ffffff;
|
410 |
+
font-weight: 500;
|
411 |
+
text-shadow: 0 1px 2px rgba(0,0,0,0.2);
|
412 |
}
|
413 |
.discord-benefits-list li::before {
|
414 |
content: "✨";
|
|
|
420 |
opacity: 0.6;
|
421 |
cursor: not-allowed;
|
422 |
}
|
423 |
+
|
424 |
+
/* Warning message styling */
|
425 |
+
.warning-message {
|
426 |
+
background-color: #2a2a2a;
|
427 |
+
border-left: 4px solid #ff7675;
|
428 |
+
padding: 12px 15px;
|
429 |
+
margin: 10px 0;
|
430 |
+
border-radius: 0 8px 8px 0;
|
431 |
+
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
|
432 |
+
color: #e0e0e0;
|
433 |
+
font-weight: bold;
|
434 |
+
}
|
435 |
'''
|
436 |
|
437 |
+
with gr.Blocks(css=css, theme=gr.themes.Soft(primary_hue="indigo", neutral_hue="slate", text_size="lg")) as demo:
|
438 |
selected_index = gr.State(None)
|
439 |
current_generation_id = gr.State(None)
|
440 |
|
441 |
gr.Markdown("# Remade AI - Wan 2.1 I2V effects LoRAs ")
|
442 |
|
443 |
+
# Discord banner at the top with improved contrast
|
444 |
discord_banner = gr.HTML(
|
445 |
"""<div class="discord-banner">
|
446 |
<h3>✨ Unlock Premium Features! ✨</h3>
|
|
|
464 |
object_fit="contain"
|
465 |
)
|
466 |
|
467 |
+
# Discord feature callout for LoRAs with better contrast
|
468 |
gr.HTML(
|
469 |
"""<div class="discord-feature">
|
470 |
<span class="discord-feature-title">✨ Discord Members:</span> Access 100+ additional LoRAs beyond these 3 samples!
|
|
|
493 |
button = gr.Button("Generate", variant="primary", elem_id="gen_btn")
|
494 |
audio_button = gr.Button("Add Audio 🔒", interactive=False)
|
495 |
|
496 |
+
with gr.Column(scale=1):
|
497 |
+
# Warning message about not refreshing
|
498 |
+
warning_message = gr.HTML(
|
499 |
+
"""<div class="warning-message">
|
500 |
+
⚠️ Please DO NOT refresh the page during generation. GPUs may need to warm up and there is a queue. Please be patient. Thank you!
|
501 |
+
</div>""",
|
502 |
+
visible=True
|
503 |
+
)
|
504 |
+
|
505 |
+
# Discord feature callout for generation speed - moved above progress bar
|
506 |
gr.HTML(
|
507 |
"""<div class="discord-feature">
|
508 |
<span class="discord-feature-title">⚡ Discord Members:</span> Enjoy priority queue with faster generation times!
|
509 |
</div>"""
|
510 |
)
|
511 |
|
|
|
512 |
progress_bar = gr.Markdown(elem_id="progress", visible=False)
|
513 |
output = gr.Video(interactive=False, label="Output video")
|
514 |
|
515 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
516 |
|
517 |
gallery.select(
|
518 |
update_selection,
|