Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -284,7 +284,10 @@ def worker(input_image, prompt, n_prompt, seed, total_second_length, latent_wind
|
|
284 |
stream.output_queue.push(('end', None))
|
285 |
return
|
286 |
|
287 |
-
|
|
|
|
|
|
|
288 |
def process(input_image, prompt, n_prompt, seed, total_second_length, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, use_teacache, mp4_crf):
|
289 |
global stream
|
290 |
assert input_image is not None, 'No input image!'
|
|
|
284 |
stream.output_queue.push(('end', None))
|
285 |
return
|
286 |
|
287 |
+
def get_duration(input_image, prompt, n_prompt, seed, total_second_length, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, use_teacache, mp4_crf):
|
288 |
+
return total_second_length * 60
|
289 |
+
|
290 |
+
@spaces.GPU(duration=get_duration)
|
291 |
def process(input_image, prompt, n_prompt, seed, total_second_length, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, use_teacache, mp4_crf):
|
292 |
global stream
|
293 |
assert input_image is not None, 'No input image!'
|