Spaces:
Running
on
Zero
Running
on
Zero
ZeroGPU
Browse files- 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 =
|
| 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
|
| 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("""
|