Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -256,15 +256,15 @@ def calculate_time_required(max_duration_s, rc_bool):
|
|
| 256 |
return None
|
| 257 |
if max_duration_s == -1:
|
| 258 |
return 75
|
| 259 |
-
if max_duration_s == 2:
|
| 260 |
return 120
|
| 261 |
-
elif max_duration_s == 4:
|
| 262 |
return 180
|
| 263 |
-
elif max_duration_s == 6:
|
| 264 |
return 260
|
| 265 |
-
elif max_duration_s == 8:
|
| 266 |
return 330
|
| 267 |
-
elif max_duration_s == 10:
|
| 268 |
return 340
|
| 269 |
|
| 270 |
def get_display_time_required(max_duration_s, rc_bool):
|
|
@@ -802,7 +802,7 @@ with gr.Blocks(css=css, title="Wan 2.2 Animate --replace", theme=gr.themes.Ocean
|
|
| 802 |
""")
|
| 803 |
input_video = gr.Video(label="Input Video", height=512)
|
| 804 |
|
| 805 |
-
max_duration_slider = gr.Slider(2, 10, 2, step=
|
| 806 |
|
| 807 |
gr.Examples(
|
| 808 |
examples=[
|
|
@@ -873,7 +873,7 @@ with gr.Blocks(css=css, title="Wan 2.2 Animate --replace", theme=gr.themes.Ocean
|
|
| 873 |
|
| 874 |
action_button = gr.Button("Wan Animate 🦆", variant='primary', elem_classes="button-gradient")
|
| 875 |
|
| 876 |
-
with gr.Accordion("
|
| 877 |
with gr.Row():
|
| 878 |
adv_masking = gr.Button("Wan Animate PRO ⚙️")
|
| 879 |
with gr.Row():
|
|
@@ -946,7 +946,7 @@ with gr.Blocks(css=css, title="Wan 2.2 Animate --replace", theme=gr.themes.Ocean
|
|
| 946 |
gr.Markdown("Choose a frame and adjust the relevant mask, by including and excluding points, to propagate across frames. If no mask is selected, one will be chosen automatically.")
|
| 947 |
gr.Markdown("")
|
| 948 |
with gr.Row():
|
| 949 |
-
max_duration_slider_2 = gr.Slider(2, 10, 2, step=
|
| 950 |
frame_index = gr.Slider(label="Frame Index", minimum=0, maximum=0, value=0, step=1,)
|
| 951 |
with gr.Row():
|
| 952 |
first_frame = gr.Image(type="filepath", height=384, interactive=False)
|
|
|
|
| 256 |
return None
|
| 257 |
if max_duration_s == -1:
|
| 258 |
return 75
|
| 259 |
+
if max_duration_s == 1 or max_duration_s == 2:
|
| 260 |
return 120
|
| 261 |
+
elif max_duration_s == 3 or max_duration_s == 4:
|
| 262 |
return 180
|
| 263 |
+
elif max_duration_s == 5 or max_duration_s == 6:
|
| 264 |
return 260
|
| 265 |
+
elif max_duration_s == 7 or max_duration_s == 8:
|
| 266 |
return 330
|
| 267 |
+
elif max_duration_s == 9 or max_duration_s == 10:
|
| 268 |
return 340
|
| 269 |
|
| 270 |
def get_display_time_required(max_duration_s, rc_bool):
|
|
|
|
| 802 |
""")
|
| 803 |
input_video = gr.Video(label="Input Video", height=512)
|
| 804 |
|
| 805 |
+
max_duration_slider = gr.Slider(2, 10, 2, step=1, label="Max Duration", visible=False)
|
| 806 |
|
| 807 |
gr.Examples(
|
| 808 |
examples=[
|
|
|
|
| 873 |
|
| 874 |
action_button = gr.Button("Wan Animate 🦆", variant='primary', elem_classes="button-gradient")
|
| 875 |
|
| 876 |
+
with gr.Accordion("Advanced 🎭", open=False, visible=True):
|
| 877 |
with gr.Row():
|
| 878 |
adv_masking = gr.Button("Wan Animate PRO ⚙️")
|
| 879 |
with gr.Row():
|
|
|
|
| 946 |
gr.Markdown("Choose a frame and adjust the relevant mask, by including and excluding points, to propagate across frames. If no mask is selected, one will be chosen automatically.")
|
| 947 |
gr.Markdown("")
|
| 948 |
with gr.Row():
|
| 949 |
+
max_duration_slider_2 = gr.Slider(2, 10, 2, step=1, label="Max Duration", visible=True)
|
| 950 |
frame_index = gr.Slider(label="Frame Index", minimum=0, maximum=0, value=0, step=1,)
|
| 951 |
with gr.Row():
|
| 952 |
first_frame = gr.Image(type="filepath", height=384, interactive=False)
|