multimodalart HF Staff commited on
Commit
f6c8f66
·
verified ·
1 Parent(s): 03f09cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
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
- @spaces.GPU()
 
 
 
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!'