multimodalart HF Staff commited on
Commit
406dc20
·
verified ·
1 Parent(s): 06ce900

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -23
app.py CHANGED
@@ -401,32 +401,34 @@ css = '''
401
  '''
402
  with gr.Blocks(theme=gr.themes.Citrus(), css=css) as app:
403
  gr.Markdown("# Wan 2.2 First/Last Frame Video Fast")
404
- gr.Markdown("Running the [Wan 2.2 First/Last Frame ComfyUI workflow](https://www.reddit.com/r/StableDiffusion/comments/1me4306/psa_wan_22_does_first_frame_last_frame_out_of_the/) on ZeroGPU")
405
 
406
  with gr.Row():
407
  with gr.Column():
408
- with gr.Row():
409
- start_image = gr.Image(type="pil", label="Start Frame")
410
- end_image = gr.Image(type="pil", label="End Frame")
411
-
412
- prompt = gr.Textbox(label="Prompt", info="Describe the transition between the two images", value="transition")
413
-
414
- with gr.Accordion("Advanced Settings", open=False):
415
- duration = gr.Radio(
416
- [("Short (2s)", 33), ("Mid (4s)", 66)],
417
- value=33,
418
- label="Video Duration",
419
- )
420
- negative_prompt = gr.Textbox(
421
- label="Negative Prompt",
422
- value="色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走,过曝,",
423
- visible=False
424
- )
425
-
426
- generate_button = gr.Button("Generate Video", variant="primary")
 
 
427
 
428
  with gr.Column():
429
- output_video = gr.Video(label="Generated Video")
430
 
431
  generate_button.click(
432
  fn=generate_video,
@@ -436,8 +438,8 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=css) as app:
436
 
437
  gr.Examples(
438
  examples=[
439
- ["poli_tower.png", "tower_takes_off.png", "the man turns"],
440
- ["capybara_zoomed.png", "capybara.png", "a dramatic dolly zoom"],
441
  ],
442
  inputs=[start_image, end_image, prompt],
443
  outputs=output_video,
 
401
  '''
402
  with gr.Blocks(theme=gr.themes.Citrus(), css=css) as app:
403
  gr.Markdown("# Wan 2.2 First/Last Frame Video Fast")
404
+ gr.Markdown("Running the [Wan 2.2 First/Last Frame ComfyUI workflow](https://www.reddit.com/r/StableDiffusion/comments/1me4306/psa_wan_22_does_first_frame_last_frame_out_of_the/) and the [lightx2v/Wan2.2-Lightning](https://huggingface.co/lightx2v/Wan2.2-Lightning) fast LoRA on ZeroGPU")
405
 
406
  with gr.Row():
407
  with gr.Column():
408
+ with gr.Group():
409
+ with gr.Row():
410
+ start_image = gr.Image(type="pil", label="Start Frame")
411
+ end_image = gr.Image(type="pil", label="End Frame")
412
+
413
+ prompt = gr.Textbox(label="Prompt", info="Describe the transition between the two images")
414
+
415
+ with gr.Accordion("Advanced Settings", open=False, visible=False):
416
+ duration = gr.Radio(
417
+ [("Short (2s)", 33), ("Mid (4s)", 66)],
418
+ value=33,
419
+ label="Video Duration",
420
+ visible=False
421
+ )
422
+ negative_prompt = gr.Textbox(
423
+ label="Negative Prompt",
424
+ value="色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走,过曝,",
425
+ visible=False
426
+ )
427
+
428
+ generate_button = gr.Button("Generate Video", variant="primary")
429
 
430
  with gr.Column():
431
+ output_video = gr.Video(label="Generated Video", autoplay=True)
432
 
433
  generate_button.click(
434
  fn=generate_video,
 
438
 
439
  gr.Examples(
440
  examples=[
441
+ ["poli_tower.png", "tower_takes_off.png", "the man turns around"],
442
+ ["capyabara_zoomed.png", "capybara.webp", "a dramatic dolly zoom"],
443
  ],
444
  inputs=[start_image, end_image, prompt],
445
  outputs=output_video,