Spaces:
Running
on
L40S
Running
on
L40S
Add example prompts and outputs for text-to-video and image-to-video generations
Browse files
app.py
CHANGED
@@ -409,7 +409,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as iface:
|
|
409 |
txt2vid_negative_prompt = gr.Textbox(
|
410 |
label="Step 2: Enter Negative Prompt (Optional)",
|
411 |
placeholder="Describe what you don't want in the video...",
|
412 |
-
value="worst quality,
|
413 |
lines=2,
|
414 |
)
|
415 |
|
@@ -427,6 +427,29 @@ with gr.Blocks(theme=gr.themes.Soft()) as iface:
|
|
427 |
with gr.Column():
|
428 |
txt2vid_output = gr.Video(label="Step 6: Generated Output")
|
429 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
430 |
# Image to Video Tab
|
431 |
with gr.TabItem("Image to Video"):
|
432 |
with gr.Row():
|
@@ -445,7 +468,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as iface:
|
|
445 |
img2vid_negative_prompt = gr.Textbox(
|
446 |
label="Step 3: Enter Negative Prompt (Optional)",
|
447 |
placeholder="Describe what you don't want in the video...",
|
448 |
-
value="worst quality,
|
449 |
lines=2,
|
450 |
)
|
451 |
|
@@ -463,6 +486,31 @@ with gr.Blocks(theme=gr.themes.Soft()) as iface:
|
|
463 |
with gr.Column():
|
464 |
img2vid_output = gr.Video(label="Step 7: Generated Output")
|
465 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
466 |
# [Previous event handlers remain the same]
|
467 |
txt2vid_preset.change(
|
468 |
fn=preset_changed, inputs=[txt2vid_preset], outputs=txt2vid_advanced[4:]
|
|
|
409 |
txt2vid_negative_prompt = gr.Textbox(
|
410 |
label="Step 2: Enter Negative Prompt (Optional)",
|
411 |
placeholder="Describe what you don't want in the video...",
|
412 |
+
value="low quality, worst quality, deformed, distorted, disfigured, motion smear, motion artifacts, fused fingers, bad anatomy, weird hand, ugly",
|
413 |
lines=2,
|
414 |
)
|
415 |
|
|
|
427 |
with gr.Column():
|
428 |
txt2vid_output = gr.Video(label="Step 6: Generated Output")
|
429 |
|
430 |
+
with gr.Row():
|
431 |
+
gr.Examples(
|
432 |
+
examples=[
|
433 |
+
[
|
434 |
+
"A young woman in a traditional Mongolian dress is peeking through a sheer white curtain, her face showing a mix of curiosity and apprehension. The woman has long black hair styled in two braids, adorned with white beads, and her eyes are wide with a hint of surprise. Her dress is a vibrant blue with intricate gold embroidery, and she wears a matching headband with a similar design. The background is a simple white curtain, which creates a sense of mystery and intrigue.ith long brown hair and light skin smiles at another woman with long blonde hair. The woman with brown hair wears a black jacket and has a small, barely noticeable mole on her right cheek. The camera angle is a close-up, focused on the woman with brown hair’s face. The lighting is warm and natural, likely from the setting sun, casting a soft glow on the scene. The scene appears to be real-life footage",
|
435 |
+
"low quality, worst quality, deformed, distorted, disfigured, motion smear, motion artifacts, fused fingers, bad anatomy, weird hand, ugly",
|
436 |
+
"assets/t2v_2.mp4",
|
437 |
+
],
|
438 |
+
[
|
439 |
+
"A young man with blond hair wearing a yellow jacket stands in a forest and looks around. He has light skin and his hair is styled with a middle part. He looks to the left and then to the right, his gaze lingering in each direction. The camera angle is low, looking up at the man, and remains stationary throughout the video. The background is slightly out of focus, with green trees and the sun shining brightly behind the man. The lighting is natural and warm, with the sun creating a lens flare that moves across the man’s face. The scene is captured in real-life footage.",
|
440 |
+
"low quality, worst quality, deformed, distorted, disfigured, motion smear, motion artifacts, fused fingers, bad anatomy, weird hand, ugly",
|
441 |
+
"assets/t2v_1.mp4",
|
442 |
+
],
|
443 |
+
[
|
444 |
+
"A cyclist races along a winding mountain road. Clad in aerodynamic gear, he pedals intensely, sweat glistening on his brow. The camera alternates between close-ups of his determined expression and wide shots of the breathtaking landscape. Pine trees blur past, and the sky is a crisp blue. The scene is invigorating and competitive.",
|
445 |
+
"low quality, worst quality, deformed, distorted, disfigured, motion smear, motion artifacts, fused fingers, bad anatomy, weird hand, ugly",
|
446 |
+
"assets/t2v_0.mp4",
|
447 |
+
],
|
448 |
+
],
|
449 |
+
inputs=[txt2vid_prompt, txt2vid_negative_prompt, txt2vid_output],
|
450 |
+
label="Example Text-to-Video Generations",
|
451 |
+
)
|
452 |
+
|
453 |
# Image to Video Tab
|
454 |
with gr.TabItem("Image to Video"):
|
455 |
with gr.Row():
|
|
|
468 |
img2vid_negative_prompt = gr.Textbox(
|
469 |
label="Step 3: Enter Negative Prompt (Optional)",
|
470 |
placeholder="Describe what you don't want in the video...",
|
471 |
+
value="low quality, worst quality, deformed, distorted, disfigured, motion smear, motion artifacts, fused fingers, bad anatomy, weird hand, ugly",
|
472 |
lines=2,
|
473 |
)
|
474 |
|
|
|
486 |
with gr.Column():
|
487 |
img2vid_output = gr.Video(label="Step 7: Generated Output")
|
488 |
|
489 |
+
with gr.Row():
|
490 |
+
gr.Examples(
|
491 |
+
examples=[
|
492 |
+
[
|
493 |
+
"assets/astronaut.jpg",
|
494 |
+
"An astronaut hatching from an egg, on the surface of the moon, the darkness and depth of space realised in the background.",
|
495 |
+
"low quality, worst quality, deformed, distorted, disfigured, motion smear, motion artifacts, fused fingers, bad anatomy, weird hand, ugly",
|
496 |
+
"assets/astronaut_left.mp4",
|
497 |
+
],
|
498 |
+
[
|
499 |
+
"assets/dancer.jpg",
|
500 |
+
"low quality, worst quality, deformed, distorted, disfigured, motion smear, motion artifacts, fused fingers, bad anatomy, weird hand, ugly",
|
501 |
+
"poor quality, jerky motion, blurry",
|
502 |
+
"assets/dancer_up.mp4",
|
503 |
+
],
|
504 |
+
],
|
505 |
+
inputs=[
|
506 |
+
img2vid_image,
|
507 |
+
img2vid_prompt,
|
508 |
+
img2vid_negative_prompt,
|
509 |
+
img2vid_output,
|
510 |
+
],
|
511 |
+
label="Example Image-to-Video Generations",
|
512 |
+
)
|
513 |
+
|
514 |
# [Previous event handlers remain the same]
|
515 |
txt2vid_preset.change(
|
516 |
fn=preset_changed, inputs=[txt2vid_preset], outputs=txt2vid_advanced[4:]
|