Merge examples
Browse files- app_v2v.py +81 -1
app_v2v.py
CHANGED
|
@@ -981,11 +981,91 @@ adapted from the official code repo [FramePack](https://github.com/lllyasviel/Fr
|
|
| 981 |
progress_bar = gr.HTML('', elem_classes='no-generating-animation')
|
| 982 |
|
| 983 |
# 20250506 pftq: Updated inputs to include num_clean_frames
|
|
|
|
| 984 |
ips_video = [input_video, prompt, n_prompt, randomize_seed, 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]
|
| 985 |
start_button.click(fn=process_video, inputs=ips_video, outputs=[result_video, preview_image, progress_desc, progress_bar, start_button, end_button])
|
| 986 |
end_button.click(fn=end_process)
|
| 987 |
|
| 988 |
-
with gr.Row(visible=False):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 989 |
gr.Examples(
|
| 990 |
examples = [
|
| 991 |
[
|
|
|
|
| 981 |
progress_bar = gr.HTML('', elem_classes='no-generating-animation')
|
| 982 |
|
| 983 |
# 20250506 pftq: Updated inputs to include num_clean_frames
|
| 984 |
+
ips = [input_image, prompt, t2v, n_prompt, randomize_seed, seed, total_second_length, latent_window_size, steps, cfg, gs, rs, gpu_memory_preservation, use_teacache, mp4_crf]
|
| 985 |
ips_video = [input_video, prompt, n_prompt, randomize_seed, 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]
|
| 986 |
start_button.click(fn=process_video, inputs=ips_video, outputs=[result_video, preview_image, progress_desc, progress_bar, start_button, end_button])
|
| 987 |
end_button.click(fn=end_process)
|
| 988 |
|
| 989 |
+
with gr.Row(elem_id="image_examples", visible=False):
|
| 990 |
+
gr.Examples(
|
| 991 |
+
examples = [
|
| 992 |
+
[
|
| 993 |
+
"./img_examples/Example1.png", # input_image
|
| 994 |
+
"View of the sea as far as the eye can see, from the seaside, a piece of land is barely visible on the horizon at the middle, the sky is radiant, reflections of the sun in the water, photorealistic, realistic, intricate details, 8k, insanely detailed",
|
| 995 |
+
False, # t2v
|
| 996 |
+
"Missing arm, unrealistic position, blurred, blurry", # n_prompt
|
| 997 |
+
True, # randomize_seed
|
| 998 |
+
42, # seed
|
| 999 |
+
1, # total_second_length
|
| 1000 |
+
9, # latent_window_size
|
| 1001 |
+
25, # steps
|
| 1002 |
+
1.0, # cfg
|
| 1003 |
+
10.0, # gs
|
| 1004 |
+
0.0, # rs
|
| 1005 |
+
6, # gpu_memory_preservation
|
| 1006 |
+
True, # use_teacache
|
| 1007 |
+
16 # mp4_crf
|
| 1008 |
+
],
|
| 1009 |
+
[
|
| 1010 |
+
"./img_examples/Example1.png", # input_image
|
| 1011 |
+
"A dolphin emerges from the water, photorealistic, realistic, intricate details, 8k, insanely detailed",
|
| 1012 |
+
False, # t2v
|
| 1013 |
+
"Missing arm, unrealistic position, blurred, blurry", # n_prompt
|
| 1014 |
+
True, # randomize_seed
|
| 1015 |
+
42, # seed
|
| 1016 |
+
1, # total_second_length
|
| 1017 |
+
9, # latent_window_size
|
| 1018 |
+
25, # steps
|
| 1019 |
+
1.0, # cfg
|
| 1020 |
+
10.0, # gs
|
| 1021 |
+
0.0, # rs
|
| 1022 |
+
6, # gpu_memory_preservation
|
| 1023 |
+
True, # use_teacache
|
| 1024 |
+
16 # mp4_crf
|
| 1025 |
+
],
|
| 1026 |
+
[
|
| 1027 |
+
"./img_examples/Example1.png", # input_image
|
| 1028 |
+
"We are sinking, photorealistic, realistic, intricate details, 8k, insanely detailed",
|
| 1029 |
+
False, # t2v
|
| 1030 |
+
"Missing arm, unrealistic position, blurred, blurry", # n_prompt
|
| 1031 |
+
True, # randomize_seed
|
| 1032 |
+
42, # seed
|
| 1033 |
+
1, # total_second_length
|
| 1034 |
+
9, # latent_window_size
|
| 1035 |
+
25, # steps
|
| 1036 |
+
1.0, # cfg
|
| 1037 |
+
10.0, # gs
|
| 1038 |
+
0.0, # rs
|
| 1039 |
+
6, # gpu_memory_preservation
|
| 1040 |
+
True, # use_teacache
|
| 1041 |
+
16 # mp4_crf
|
| 1042 |
+
],
|
| 1043 |
+
[
|
| 1044 |
+
"./img_examples/Example1.png", # input_image
|
| 1045 |
+
"A boat is passing, photorealistic, realistic, intricate details, 8k, insanely detailed",
|
| 1046 |
+
False, # t2v
|
| 1047 |
+
"Missing arm, unrealistic position, blurred, blurry", # n_prompt
|
| 1048 |
+
True, # randomize_seed
|
| 1049 |
+
42, # seed
|
| 1050 |
+
1, # total_second_length
|
| 1051 |
+
9, # latent_window_size
|
| 1052 |
+
25, # steps
|
| 1053 |
+
1.0, # cfg
|
| 1054 |
+
10.0, # gs
|
| 1055 |
+
0.0, # rs
|
| 1056 |
+
6, # gpu_memory_preservation
|
| 1057 |
+
True, # use_teacache
|
| 1058 |
+
16 # mp4_crf
|
| 1059 |
+
],
|
| 1060 |
+
],
|
| 1061 |
+
run_on_click = True,
|
| 1062 |
+
fn = process,
|
| 1063 |
+
inputs = ips,
|
| 1064 |
+
outputs = [result_video, preview_image, progress_desc, progress_bar, start_button, end_button],
|
| 1065 |
+
cache_examples = True,
|
| 1066 |
+
)
|
| 1067 |
+
|
| 1068 |
+
with gr.Row(elem_id="video_examples", visible=False):
|
| 1069 |
gr.Examples(
|
| 1070 |
examples = [
|
| 1071 |
[
|