alexnasa commited on
Commit
276fd4b
Β·
verified Β·
1 Parent(s): 8f45b32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -9
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.Markdown("# LTX-2 Distilled πŸŽ₯πŸ”ˆ: The First Open Source Audio-Video Model")
374
- gr.Markdown("Fast, state-of-the-art video & audio generation with [Lightricks LTX-2 TI2V model](https://huggingface.co/Lightricks/LTX-2) and [distillation LoRA](https://huggingface.co/Lightricks/LTX-2/blob/main/ltx-2-19b-distilled-lora-384.safetensors) for accelerated inference. Read more: [[model]](https://huggingface.co/Lightricks/LTX-2), [[code]](https://github.com/Lightricks/LTX-2)")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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,