Spaces:
Running
on
Zero
Running
on
Zero
Update app_fast.py
Browse files- app_fast.py +3 -3
app_fast.py
CHANGED
@@ -95,13 +95,13 @@ def get_duration(input_image, prompt, height, width,
|
|
95 |
seed, randomize_seed,
|
96 |
progress):
|
97 |
if steps > 5 and duration_seconds > 5:
|
98 |
-
return
|
99 |
elif steps > 5 or duration_seconds > 5:
|
100 |
-
return
|
101 |
else:
|
102 |
return 40
|
103 |
|
104 |
-
@spaces.GPU
|
105 |
def generate_video(input_image, prompt, height, width, negative_prompt=default_negative_prompt, duration_seconds=2, guidance_scale=0, steps=4, seed=44, randomize_seed=False, progress=gr.Progress(track_tqdm=True)):
|
106 |
target_h = max(MOD_VALUE, (int(height) // MOD_VALUE) * MOD_VALUE)
|
107 |
target_w = max(MOD_VALUE, (int(width) // MOD_VALUE) * MOD_VALUE)
|
|
|
95 |
seed, randomize_seed,
|
96 |
progress):
|
97 |
if steps > 5 and duration_seconds > 5:
|
98 |
+
return 60
|
99 |
elif steps > 5 or duration_seconds > 5:
|
100 |
+
return 50
|
101 |
else:
|
102 |
return 40
|
103 |
|
104 |
+
@spaces.GPU(duration=get_duration)
|
105 |
def generate_video(input_image, prompt, height, width, negative_prompt=default_negative_prompt, duration_seconds=2, guidance_scale=0, steps=4, seed=44, randomize_seed=False, progress=gr.Progress(track_tqdm=True)):
|
106 |
target_h = max(MOD_VALUE, (int(height) // MOD_VALUE) * MOD_VALUE)
|
107 |
target_w = max(MOD_VALUE, (int(width) // MOD_VALUE) * MOD_VALUE)
|