multimodalart HF Staff commited on
Commit
ffec15c
·
verified ·
1 Parent(s): c61da4b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -16
app.py CHANGED
@@ -227,6 +227,23 @@ with gr.Blocks(css="style.css") as demo:
227
  )
228
 
229
  with gr.Tabs() as tabs:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
230
  with gr.TabItem("Text-to-Video", id=0):
231
  mode_t2v = gr.State("t2v")
232
  with gr.Row():
@@ -245,22 +262,7 @@ with gr.Blocks(css="style.css") as demo:
245
  with gr.Column(scale=3):
246
  video_output_t2v = gr.Video(label="Generated Video", interactive=False)
247
 
248
- with gr.TabItem("Image-to-Video", id=1):
249
- mode_i2v = gr.State("i2v")
250
- with gr.Row():
251
- with gr.Column(scale=2):
252
- image_i2v = gr.Image(type="numpy", label="Input Image")
253
- prompt_i2v = gr.Textbox(label="Prompt", lines=4, placeholder="The cat in the image wags its tail and blinks.")
254
- neg_prompt_i2v = gr.Textbox(label="Negative Prompt", lines=2, value="ugly, blurry, low quality, static, subtitles, watermark")
255
- resolution_i2v = gr.Dropdown(label="Resolution", choices=["480p", "720p"], value="480p")
256
- with gr.Row():
257
- seed_i2v = gr.Number(label="Seed", value=42, precision=0)
258
- distill_i2v = gr.Checkbox(label="Use Distill Mode", value=False, info="Faster, lower quality base generation.")
259
- refine_i2v = gr.Checkbox(label="Use Refine Mode", value=False, info="Higher quality & resolution, but slower. Uses Distill mode for its first stage.")
260
-
261
- i2v_button = gr.Button("Generate Video", variant="primary")
262
- with gr.Column(scale=3):
263
- video_output_i2v = gr.Video(label="Generated Video", interactive=False)
264
 
265
  # --- Event Handlers ---
266
  t2v_inputs = [
 
227
  )
228
 
229
  with gr.Tabs() as tabs:
230
+ with gr.TabItem("Image-to-Video", id=1):
231
+ mode_i2v = gr.State("i2v")
232
+ with gr.Row():
233
+ with gr.Column(scale=2):
234
+ image_i2v = gr.Image(type="numpy", label="Input Image")
235
+ prompt_i2v = gr.Textbox(label="Prompt", lines=4, placeholder="The cat in the image wags its tail and blinks.")
236
+ neg_prompt_i2v = gr.Textbox(label="Negative Prompt", lines=2, value="ugly, blurry, low quality, static, subtitles, watermark")
237
+ resolution_i2v = gr.Dropdown(label="Resolution", choices=["480p", "720p"], value="480p")
238
+ with gr.Row():
239
+ seed_i2v = gr.Number(label="Seed", value=42, precision=0)
240
+ distill_i2v = gr.Checkbox(label="Use Distill Mode", value=False, info="Faster, lower quality base generation.")
241
+ refine_i2v = gr.Checkbox(label="Use Refine Mode", value=False, info="Higher quality & resolution, but slower. Uses Distill mode for its first stage.")
242
+
243
+ i2v_button = gr.Button("Generate Video", variant="primary")
244
+ with gr.Column(scale=3):
245
+ video_output_i2v = gr.Video(label="Generated Video", interactive=False)
246
+
247
  with gr.TabItem("Text-to-Video", id=0):
248
  mode_t2v = gr.State("t2v")
249
  with gr.Row():
 
262
  with gr.Column(scale=3):
263
  video_output_t2v = gr.Video(label="Generated Video", interactive=False)
264
 
265
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
266
 
267
  # --- Event Handlers ---
268
  t2v_inputs = [