Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -267,23 +267,6 @@ with block:
|
|
267 |
key_gen_button = gr.Button(value="Generate Key Frames", interactive=False)
|
268 |
result_gallery = gr.Gallery(height=512, object_fit='contain', label='Outputs', columns=4)
|
269 |
|
270 |
-
with gr.Accordion(label='Step 3: Generate All Videos', open=True):
|
271 |
-
with gr.Row():
|
272 |
-
with gr.Column():
|
273 |
-
i2v_input_text = gr.Text(label='Prompts', value='1girl, masterpiece, best quality')
|
274 |
-
i2v_seed = gr.Slider(label='Stage 2 Seed', minimum=0, maximum=50000, step=1, value=123)
|
275 |
-
i2v_cfg_scale = gr.Slider(minimum=1.0, maximum=15.0, step=0.5, label='CFG Scale', value=7.5,
|
276 |
-
elem_id="i2v_cfg_scale")
|
277 |
-
i2v_steps = gr.Slider(minimum=1, maximum=60, step=1, elem_id="i2v_steps",
|
278 |
-
label="Sampling steps", value=15)
|
279 |
-
i2v_fps = gr.Slider(minimum=1, maximum=30, step=1, elem_id="i2v_motion", label="FPS", value=4)
|
280 |
-
with gr.Column():
|
281 |
-
i2v_end_btn = gr.Button("Generate Video", interactive=False)
|
282 |
-
i2v_output_video = gr.Video(label="Generated Video", elem_id="output_vid", autoplay=True,
|
283 |
-
show_share_button=True, height=512)
|
284 |
-
with gr.Row():
|
285 |
-
i2v_output_images = gr.Gallery(height=512, label="Output Frames", object_fit="contain", columns=8)
|
286 |
-
|
287 |
input_fg.change(lambda: ["", gr.update(interactive=True), gr.update(interactive=False), gr.update(interactive=False)],
|
288 |
outputs=[prompt, prompt_gen_button, key_gen_button, i2v_end_btn])
|
289 |
|
@@ -301,11 +284,6 @@ with block:
|
|
301 |
).then(lambda: [gr.update(interactive=True), gr.update(interactive=True), gr.update(interactive=True)],
|
302 |
outputs=[prompt_gen_button, key_gen_button, i2v_end_btn])
|
303 |
|
304 |
-
i2v_end_btn.click(
|
305 |
-
inputs=[result_gallery, i2v_input_text, i2v_steps, i2v_cfg_scale, i2v_fps, i2v_seed],
|
306 |
-
outputs=[i2v_output_video, i2v_output_images],
|
307 |
-
fn=process_video
|
308 |
-
)
|
309 |
|
310 |
dbs = [
|
311 |
['./imgs/1.jpg', 12345, 123],
|
@@ -315,7 +293,7 @@ with block:
|
|
315 |
|
316 |
gr.Examples(
|
317 |
examples=dbs,
|
318 |
-
inputs=[input_fg, seed
|
319 |
examples_per_page=1024
|
320 |
)
|
321 |
|
|
|
267 |
key_gen_button = gr.Button(value="Generate Key Frames", interactive=False)
|
268 |
result_gallery = gr.Gallery(height=512, object_fit='contain', label='Outputs', columns=4)
|
269 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
input_fg.change(lambda: ["", gr.update(interactive=True), gr.update(interactive=False), gr.update(interactive=False)],
|
271 |
outputs=[prompt, prompt_gen_button, key_gen_button, i2v_end_btn])
|
272 |
|
|
|
284 |
).then(lambda: [gr.update(interactive=True), gr.update(interactive=True), gr.update(interactive=True)],
|
285 |
outputs=[prompt_gen_button, key_gen_button, i2v_end_btn])
|
286 |
|
|
|
|
|
|
|
|
|
|
|
287 |
|
288 |
dbs = [
|
289 |
['./imgs/1.jpg', 12345, 123],
|
|
|
293 |
|
294 |
gr.Examples(
|
295 |
examples=dbs,
|
296 |
+
inputs=[input_fg, seed],
|
297 |
examples_per_page=1024
|
298 |
)
|
299 |
|