Fabrice-TIERCELIN commited on
Commit
334306f
·
verified ·
1 Parent(s): cb1e1a8

process_example

Browse files
Files changed (1) hide show
  1. app_endframe.py +6 -2
app_endframe.py CHANGED
@@ -665,6 +665,10 @@ 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
  @spaces.GPU(duration=get_duration)
669
  def process(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
@@ -814,9 +818,9 @@ with block:
814
  ],
815
  ],
816
  run_on_click = True,
817
- fn = process,
818
  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],
819
- outputs = [result_video, preview_image, progress_desc, progress_bar, start_button, end_button],
820
  cache_examples = True,
821
  )
822
  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
+ 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
+ [result_video, preview_image, progress_desc, progress_bar, start_button, end_button] = process(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
+ return [result_video]
671
+
672
  @spaces.GPU(duration=get_duration)
673
  def process(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):
674
  global stream, high_vram
 
818
  ],
819
  ],
820
  run_on_click = True,
821
+ fn = process_example,
822
  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],
823
+ outputs = [result_video],
824
  cache_examples = True,
825
  )
826
  gr.HTML("""