Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -253,18 +253,16 @@ preset_options = [
|
|
253 |
{"label": "[16:9] 512x320, 10.3μ΄", "width": 512, "height": 320, "num_frames": 257},
|
254 |
]
|
255 |
|
256 |
-
|
257 |
-
# preset_changed ν¨μ μμ
|
258 |
def preset_changed(preset):
|
259 |
selected = next(item for item in preset_options if item["label"] == preset)
|
260 |
-
return
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
|
269 |
def generate_video_from_text(
|
270 |
prompt="",
|
@@ -605,19 +603,18 @@ with gr.Blocks(theme=gr.themes.Soft()) as iface:
|
|
605 |
with gr.Column():
|
606 |
img2vid_output = gr.Video(label="μμ±λ λΉλμ€")
|
607 |
|
608 |
-
# preset λ³κ²½ μ΄λ²€νΈ νΈλ€λ¬ μμ
|
609 |
txt2vid_preset.change(
|
610 |
fn=preset_changed,
|
611 |
inputs=[txt2vid_preset],
|
612 |
-
outputs=
|
613 |
-
txt2vid_current_height
|
614 |
-
txt2vid_current_width
|
615 |
-
txt2vid_current_num_frames
|
616 |
-
txt2vid_advanced[3]
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
|
622 |
|
623 |
txt2vid_enhance_toggle.change(
|
@@ -643,7 +640,6 @@ with gr.Blocks(theme=gr.themes.Soft()) as iface:
|
|
643 |
queue=True,
|
644 |
)
|
645 |
|
646 |
-
|
647 |
img2vid_preset.change(
|
648 |
fn=preset_changed,
|
649 |
inputs=[img2vid_preset],
|
|
|
253 |
{"label": "[16:9] 512x320, 10.3μ΄", "width": 512, "height": 320, "num_frames": 257},
|
254 |
]
|
255 |
|
|
|
|
|
256 |
def preset_changed(preset):
|
257 |
selected = next(item for item in preset_options if item["label"] == preset)
|
258 |
+
return [
|
259 |
+
selected["height"],
|
260 |
+
selected["width"],
|
261 |
+
selected["num_frames"],
|
262 |
+
gr.update(visible=False),
|
263 |
+
gr.update(visible=False),
|
264 |
+
gr.update(visible=False),
|
265 |
+
]
|
266 |
|
267 |
def generate_video_from_text(
|
268 |
prompt="",
|
|
|
603 |
with gr.Column():
|
604 |
img2vid_output = gr.Video(label="μμ±λ λΉλμ€")
|
605 |
|
|
|
606 |
txt2vid_preset.change(
|
607 |
fn=preset_changed,
|
608 |
inputs=[txt2vid_preset],
|
609 |
+
outputs=[
|
610 |
+
txt2vid_current_height,
|
611 |
+
txt2vid_current_width,
|
612 |
+
txt2vid_current_num_frames,
|
613 |
+
*txt2vid_advanced[3:]
|
614 |
+
]
|
615 |
+
)
|
616 |
+
|
617 |
+
|
618 |
|
619 |
|
620 |
txt2vid_enhance_toggle.change(
|
|
|
640 |
queue=True,
|
641 |
)
|
642 |
|
|
|
643 |
img2vid_preset.change(
|
644 |
fn=preset_changed,
|
645 |
inputs=[img2vid_preset],
|