multimodalart HF Staff commited on
Commit
54b40a7
·
verified ·
1 Parent(s): 164a9f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -108,7 +108,7 @@ def generate_video(input_image, prompt, height, width,
108
  with tempfile.NamedTemporaryFile(suffix=".mp4", delete=False) as tmpfile:
109
  video_path = tmpfile.name
110
  export_to_video(output_frames_list, video_path, fps=FIXED_FPS)
111
- return video_path
112
 
113
  with gr.Blocks() as demo:
114
  gr.Markdown("# Fast 4 steps Wan 2.1 I2V (14B) with CausVid LoRA")
@@ -149,14 +149,14 @@ with gr.Blocks() as demo:
149
  negative_prompt_input, duration_seconds_input,
150
  guidance_scale_input, steps_slider, seed_input, randomize_seed_checkbox
151
  ]
152
- generate_button.click(fn=generate_video, inputs=ui_inputs, outputs=video_output)
153
 
154
  gr.Examples(
155
  examples=[
156
  ["peng.png", "a penguin playfully dancing in the snow, Antarctica", 896, 512],
157
  ["forg.jpg", "the frog jumps around", 448, 832],
158
  ],
159
- inputs=[input_image_component, prompt_input, height_input, width_input], outputs=video_output, fn=generate_video, cache_examples="lazy"
160
  )
161
 
162
  if __name__ == "__main__":
 
108
  with tempfile.NamedTemporaryFile(suffix=".mp4", delete=False) as tmpfile:
109
  video_path = tmpfile.name
110
  export_to_video(output_frames_list, video_path, fps=FIXED_FPS)
111
+ return video_path, current_seed
112
 
113
  with gr.Blocks() as demo:
114
  gr.Markdown("# Fast 4 steps Wan 2.1 I2V (14B) with CausVid LoRA")
 
149
  negative_prompt_input, duration_seconds_input,
150
  guidance_scale_input, steps_slider, seed_input, randomize_seed_checkbox
151
  ]
152
+ generate_button.click(fn=generate_video, inputs=ui_inputs, outputs=[video_output, seed_input])
153
 
154
  gr.Examples(
155
  examples=[
156
  ["peng.png", "a penguin playfully dancing in the snow, Antarctica", 896, 512],
157
  ["forg.jpg", "the frog jumps around", 448, 832],
158
  ],
159
+ inputs=[input_image_component, prompt_input, height_input, width_input], outputs=[video_output, seed_input], fn=generate_video, cache_examples="lazy"
160
  )
161
 
162
  if __name__ == "__main__":