Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -129,8 +129,18 @@ def calculate_new_dimensions(orig_w, orig_h):
|
|
129 |
|
130 |
return int(new_h), int(new_w)
|
131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
|
133 |
-
@spaces.GPU
|
134 |
def generate(prompt, negative_prompt, input_image_filepath, input_video_filepath,
|
135 |
height_ui, width_ui, mode,
|
136 |
ui_steps, duration_ui,
|
|
|
129 |
|
130 |
return int(new_h), int(new_w)
|
131 |
|
132 |
+
def get_duration(prompt, negative_prompt, input_image_filepath, input_video_filepath,
|
133 |
+
height_ui, width_ui, mode,
|
134 |
+
ui_steps, duration_ui,
|
135 |
+
ui_frames_to_use,
|
136 |
+
seed_ui, randomize_seed, ui_guidance_scale, improve_texture_flag,
|
137 |
+
progress):
|
138 |
+
if duration_ui > 7:
|
139 |
+
return 75
|
140 |
+
else:
|
141 |
+
return 60
|
142 |
|
143 |
+
@spaces.GPU(duration=get_duration)
|
144 |
def generate(prompt, negative_prompt, input_image_filepath, input_video_filepath,
|
145 |
height_ui, width_ui, mode,
|
146 |
ui_steps, duration_ui,
|