Fabrice-TIERCELIN commited on
Commit
28b36c8
·
verified ·
1 Parent(s): 3e3bb91

Improve time

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -516,7 +516,7 @@ def worker(input_image, prompts, n_prompt, seed, resolution, total_second_length
516
  return
517
 
518
  def get_duration(input_image, prompt, generation_mode, n_prompt, randomize_seed, seed, resolution, total_second_length, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, enable_preview, use_teacache, mp4_crf):
519
- return total_second_length * 60 * (0.7 if use_teacache else 1.3) * (2**((resolution - 640) / 640)) * (1 + ((steps - 25) / 100))
520
 
521
 
522
  @spaces.GPU(duration=get_duration)
@@ -844,7 +844,7 @@ def worker_video(input_video, prompts, n_prompt, seed, batch, resolution, total_
844
  return
845
 
846
  def get_duration_video(input_video, prompt, n_prompt, randomize_seed, seed, batch, resolution, total_second_length, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, enable_preview, use_teacache, no_resize, mp4_crf, num_clean_frames, vae_batch):
847
- return total_second_length * 60 * (0.7 if use_teacache else 2) * (2**((resolution - 640) / 640)) * (1 + ((steps - 25) / 100))
848
 
849
  # 20250506 pftq: Modified process to pass clean frame count, etc from video_encode
850
  @spaces.GPU(duration=get_duration_video)
 
516
  return
517
 
518
  def get_duration(input_image, prompt, generation_mode, n_prompt, randomize_seed, seed, resolution, total_second_length, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, enable_preview, use_teacache, mp4_crf):
519
+ return total_second_length * 60 * (0.9 if use_teacache else 1.5) * (2**((resolution - 640) / 640)) * (1 + ((steps - 25) / 100))
520
 
521
 
522
  @spaces.GPU(duration=get_duration)
 
844
  return
845
 
846
  def get_duration_video(input_video, prompt, n_prompt, randomize_seed, seed, batch, resolution, total_second_length, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, enable_preview, use_teacache, no_resize, mp4_crf, num_clean_frames, vae_batch):
847
+ return total_second_length * 60 * (0.9 if use_teacache else 2.3) * (2**((resolution - 640) / 640)) * (1 + ((steps - 25) / 100))
848
 
849
  # 20250506 pftq: Modified process to pass clean frame count, etc from video_encode
850
  @spaces.GPU(duration=get_duration_video)