Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -475,62 +475,63 @@ with gr.Blocks(css=css, title="LTX-2 Video Distilled 🎥🔈") as demo:
|
|
| 475 |
</div>
|
| 476 |
"""
|
| 477 |
)
|
| 478 |
-
with gr.
|
| 479 |
-
with gr.
|
| 480 |
-
|
| 481 |
-
|
| 482 |
-
|
| 483 |
-
|
| 484 |
-
|
| 485 |
-
|
| 486 |
-
|
| 487 |
-
|
| 488 |
-
|
| 489 |
-
|
| 490 |
-
|
| 491 |
-
|
| 492 |
-
duration = gr.Slider(
|
| 493 |
-
label="Duration (seconds)",
|
| 494 |
-
minimum=1.0,
|
| 495 |
-
maximum=10.0,
|
| 496 |
-
value=3.0,
|
| 497 |
-
step=0.1
|
| 498 |
-
)
|
| 499 |
-
enhance_prompt = gr.Checkbox(
|
| 500 |
-
label="Enhance Prompt",
|
| 501 |
-
value=True,
|
| 502 |
-
visible=False
|
| 503 |
-
)
|
| 504 |
-
|
| 505 |
-
with gr.Accordion("Advanced Settings", open=False):
|
| 506 |
-
seed = gr.Slider(
|
| 507 |
-
label="Seed",
|
| 508 |
-
minimum=0,
|
| 509 |
-
maximum=MAX_SEED,
|
| 510 |
-
value=DEFAULT_SEED,
|
| 511 |
-
step=1
|
| 512 |
)
|
| 513 |
-
|
| 514 |
-
|
| 515 |
-
|
| 516 |
-
|
|
|
|
|
|
|
| 517 |
)
|
| 518 |
-
|
| 519 |
-
|
| 520 |
-
|
| 521 |
-
|
| 522 |
-
value=DEFAULT_1_STAGE_WIDTH,
|
| 523 |
-
precision=0
|
| 524 |
)
|
| 525 |
-
|
| 526 |
-
|
| 527 |
-
|
| 528 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 529 |
)
|
| 530 |
-
|
| 531 |
-
|
| 532 |
-
|
| 533 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 534 |
|
| 535 |
generate_btn.click(
|
| 536 |
fn=generate_video,
|
|
|
|
| 475 |
</div>
|
| 476 |
"""
|
| 477 |
)
|
| 478 |
+
with gr.Column(elem_id="col-container"):
|
| 479 |
+
with gr.Row():
|
| 480 |
+
with gr.Column(elem_id="step-column"):
|
| 481 |
+
input_image = gr.Image(
|
| 482 |
+
label="Input Image (Optional)",
|
| 483 |
+
type="pil",
|
| 484 |
+
height=512)
|
| 485 |
+
|
| 486 |
+
prompt = gr.Textbox(
|
| 487 |
+
label="Prompt",
|
| 488 |
+
value="Make this image come alive with cinematic motion, smooth animation",
|
| 489 |
+
lines=3,
|
| 490 |
+
max_lines=3,
|
| 491 |
+
placeholder="Describe the motion and animation you want..."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 492 |
)
|
| 493 |
+
duration = gr.Slider(
|
| 494 |
+
label="Duration (seconds)",
|
| 495 |
+
minimum=1.0,
|
| 496 |
+
maximum=10.0,
|
| 497 |
+
value=3.0,
|
| 498 |
+
step=0.1
|
| 499 |
)
|
| 500 |
+
enhance_prompt = gr.Checkbox(
|
| 501 |
+
label="Enhance Prompt",
|
| 502 |
+
value=True,
|
| 503 |
+
visible=False
|
|
|
|
|
|
|
| 504 |
)
|
| 505 |
+
|
| 506 |
+
with gr.Accordion("Advanced Settings", open=False):
|
| 507 |
+
seed = gr.Slider(
|
| 508 |
+
label="Seed",
|
| 509 |
+
minimum=0,
|
| 510 |
+
maximum=MAX_SEED,
|
| 511 |
+
value=DEFAULT_SEED,
|
| 512 |
+
step=1
|
| 513 |
)
|
| 514 |
+
|
| 515 |
+
randomize_seed = gr.Checkbox(
|
| 516 |
+
label="Randomize Seed",
|
| 517 |
+
value=True
|
| 518 |
+
)
|
| 519 |
+
|
| 520 |
+
with gr.Row():
|
| 521 |
+
width = gr.Number(
|
| 522 |
+
label="Width",
|
| 523 |
+
value=DEFAULT_1_STAGE_WIDTH,
|
| 524 |
+
precision=0
|
| 525 |
+
)
|
| 526 |
+
height = gr.Number(
|
| 527 |
+
label="Height",
|
| 528 |
+
value=DEFAULT_1_STAGE_HEIGHT,
|
| 529 |
+
precision=0
|
| 530 |
+
)
|
| 531 |
+
|
| 532 |
+
with gr.Column(elem_id="step-column"):
|
| 533 |
+
output_video = gr.Video(label="Generated Video", autoplay=True, height=512)
|
| 534 |
+
generate_btn = gr.Button("🤩 Generate Video", variant="primary", elem_classes="button-gradient")
|
| 535 |
|
| 536 |
generate_btn.click(
|
| 537 |
fn=generate_video,
|