Fabrice-TIERCELIN commited on
Commit
50df1fc
·
verified ·
1 Parent(s): 9a22ed3
Files changed (1) hide show
  1. app_endframe.py +3 -2
app_endframe.py CHANGED
@@ -665,6 +665,7 @@ def worker(input_video, end_frame, end_frame_weight, prompt, n_prompt, seed, bat
665
  def get_duration(input_video, end_frame, end_frame_weight, prompt, n_prompt, seed, batch, resolution, total_second_length, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, use_teacache, no_resize, mp4_crf, num_clean_frames, vae_batch):
666
  return total_second_length * 60
667
 
 
668
  def process_example(input_video, end_frame, end_frame_weight, prompt, n_prompt, seed, batch, resolution, total_second_length, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, use_teacache, no_resize, mp4_crf, num_clean_frames, vae_batch):
669
  global stream, high_vram
670
  # 20250506 pftq: Updated assertion for video input
@@ -857,9 +858,9 @@ with block:
857
  ],
858
  ],
859
  run_on_click = True,
860
- fn = process,
861
  inputs = [input_video, end_frame, end_frame_weight, prompt, n_prompt, seed, batch, resolution, total_second_length, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, use_teacache, no_resize, mp4_crf, num_clean_frames, vae_batch],
862
- outputs = [result_video, preview_image, progress_desc, progress_bar, start_button, end_button],
863
  cache_examples = True,
864
  )
865
  gr.HTML("""
 
665
  def get_duration(input_video, end_frame, end_frame_weight, prompt, n_prompt, seed, batch, resolution, total_second_length, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, use_teacache, no_resize, mp4_crf, num_clean_frames, vae_batch):
666
  return total_second_length * 60
667
 
668
+ @spaces.GPU(duration=get_duration)
669
  def process_example(input_video, end_frame, end_frame_weight, prompt, n_prompt, seed, batch, resolution, total_second_length, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, use_teacache, no_resize, mp4_crf, num_clean_frames, vae_batch):
670
  global stream, high_vram
671
  # 20250506 pftq: Updated assertion for video input
 
858
  ],
859
  ],
860
  run_on_click = True,
861
+ fn = process_example,
862
  inputs = [input_video, end_frame, end_frame_weight, prompt, n_prompt, seed, batch, resolution, total_second_length, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, use_teacache, no_resize, mp4_crf, num_clean_frames, vae_batch],
863
+ outputs = [result_video],
864
  cache_examples = True,
865
  )
866
  gr.HTML("""