Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -370,20 +370,35 @@ def generate_video(
|
|
| 370 |
|
| 371 |
# Create Gradio interface
|
| 372 |
with gr.Blocks(title="LTX-2 Video Distilled π₯π") as demo:
|
| 373 |
-
gr.
|
| 374 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 375 |
with gr.Row():
|
| 376 |
with gr.Column():
|
| 377 |
input_image = gr.Image(
|
| 378 |
label="Input Image (Optional)",
|
| 379 |
-
type="pil"
|
| 380 |
-
|
| 381 |
|
| 382 |
prompt = gr.Textbox(
|
| 383 |
label="Prompt",
|
| 384 |
-
info="for best results - make it as elaborate as possible",
|
| 385 |
value="Make this image come alive with cinematic motion, smooth animation",
|
| 386 |
lines=3,
|
|
|
|
| 387 |
placeholder="Describe the motion and animation you want..."
|
| 388 |
)
|
| 389 |
with gr.Row():
|
|
@@ -396,11 +411,10 @@ with gr.Blocks(title="LTX-2 Video Distilled π₯π") as demo:
|
|
| 396 |
)
|
| 397 |
enhance_prompt = gr.Checkbox(
|
| 398 |
label="Enhance Prompt",
|
| 399 |
-
value=True
|
|
|
|
| 400 |
)
|
| 401 |
|
| 402 |
-
generate_btn = gr.Button("Generate Video", variant="primary", size="lg")
|
| 403 |
-
|
| 404 |
with gr.Accordion("Advanced Settings", open=False):
|
| 405 |
seed = gr.Slider(
|
| 406 |
label="Seed",
|
|
@@ -428,7 +442,8 @@ with gr.Blocks(title="LTX-2 Video Distilled π₯π") as demo:
|
|
| 428 |
)
|
| 429 |
|
| 430 |
with gr.Column():
|
| 431 |
-
output_video = gr.Video(label="Generated Video", autoplay=True)
|
|
|
|
| 432 |
|
| 433 |
generate_btn.click(
|
| 434 |
fn=generate_video,
|
|
|
|
| 370 |
|
| 371 |
# Create Gradio interface
|
| 372 |
with gr.Blocks(title="LTX-2 Video Distilled π₯π") as demo:
|
| 373 |
+
gr.HTML(
|
| 374 |
+
"""
|
| 375 |
+
<div style="text-align: left;">
|
| 376 |
+
<p style="font-size:16px; display: inline; margin: 0;">
|
| 377 |
+
<strong>LTX-2 Distilled</strong>
|
| 378 |
+
</p>
|
| 379 |
+
<a href="https://huggingface.co/Lightricks/LTX-2" style="display: inline-block; vertical-align: middle; margin-left: 0.5em;">
|
| 380 |
+
[model]
|
| 381 |
+
</a>
|
| 382 |
+
</div>
|
| 383 |
+
<div style="text-align: left;">
|
| 384 |
+
<p style="font-size:16px; display: inline; margin: 0;">
|
| 385 |
+
Using FA3 and Gemma 3 12B 4bit Quantisation for Faster Inference
|
| 386 |
+
</p>
|
| 387 |
+
</div>
|
| 388 |
+
"""
|
| 389 |
+
)
|
| 390 |
with gr.Row():
|
| 391 |
with gr.Column():
|
| 392 |
input_image = gr.Image(
|
| 393 |
label="Input Image (Optional)",
|
| 394 |
+
type="pil",
|
| 395 |
+
height=512)
|
| 396 |
|
| 397 |
prompt = gr.Textbox(
|
| 398 |
label="Prompt",
|
|
|
|
| 399 |
value="Make this image come alive with cinematic motion, smooth animation",
|
| 400 |
lines=3,
|
| 401 |
+
max_lines=3,
|
| 402 |
placeholder="Describe the motion and animation you want..."
|
| 403 |
)
|
| 404 |
with gr.Row():
|
|
|
|
| 411 |
)
|
| 412 |
enhance_prompt = gr.Checkbox(
|
| 413 |
label="Enhance Prompt",
|
| 414 |
+
value=True,
|
| 415 |
+
visible=False
|
| 416 |
)
|
| 417 |
|
|
|
|
|
|
|
| 418 |
with gr.Accordion("Advanced Settings", open=False):
|
| 419 |
seed = gr.Slider(
|
| 420 |
label="Seed",
|
|
|
|
| 442 |
)
|
| 443 |
|
| 444 |
with gr.Column():
|
| 445 |
+
output_video = gr.Video(label="Generated Video", autoplay=True, height=512)
|
| 446 |
+
generate_btn = gr.Button("Generate Video", variant="primary", size="lg")
|
| 447 |
|
| 448 |
generate_btn.click(
|
| 449 |
fn=generate_video,
|