Merge examples
Browse files
app.py
CHANGED
|
@@ -980,11 +980,13 @@ adapted from the official code repo [FramePack](https://github.com/lllyasviel/Fr
|
|
| 980 |
progress_desc = gr.Markdown('', elem_classes='no-generating-animation')
|
| 981 |
progress_bar = gr.HTML('', elem_classes='no-generating-animation')
|
| 982 |
|
|
|
|
| 983 |
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]
|
|
|
|
| 984 |
start_button.click(fn=process, inputs=ips, outputs=[result_video, preview_image, progress_desc, progress_bar, start_button, end_button])
|
| 985 |
end_button.click(fn=end_process)
|
| 986 |
|
| 987 |
-
with gr.Row(visible=False):
|
| 988 |
gr.Examples(
|
| 989 |
examples = [
|
| 990 |
[
|
|
@@ -1063,6 +1065,38 @@ adapted from the official code repo [FramePack](https://github.com/lllyasviel/Fr
|
|
| 1063 |
cache_examples = True,
|
| 1064 |
)
|
| 1065 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1066 |
gr.Markdown('## Guide')
|
| 1067 |
gr.Markdown("I discourage to use the Text-to-Video feature. You should rather generate an image with Flux and use Image-to-Video. You will save time.")
|
| 1068 |
|
|
|
|
| 980 |
progress_desc = gr.Markdown('', elem_classes='no-generating-animation')
|
| 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, inputs=ips, 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 |
[
|
|
|
|
| 1065 |
cache_examples = True,
|
| 1066 |
)
|
| 1067 |
|
| 1068 |
+
with gr.Row(elem_id="video_examples", visible=False):
|
| 1069 |
+
gr.Examples(
|
| 1070 |
+
examples = [
|
| 1071 |
+
[
|
| 1072 |
+
"./img_examples/Example1.mp4", # input_video
|
| 1073 |
+
"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",
|
| 1074 |
+
"Missing arm, unrealistic position, blurred, blurry", # n_prompt
|
| 1075 |
+
True, # randomize_seed
|
| 1076 |
+
42, # seed
|
| 1077 |
+
1, # batch
|
| 1078 |
+
640, # resolution
|
| 1079 |
+
1, # total_second_length
|
| 1080 |
+
9, # latent_window_size
|
| 1081 |
+
25, # steps
|
| 1082 |
+
1.0, # cfg
|
| 1083 |
+
10.0, # gs
|
| 1084 |
+
0.0, # rs
|
| 1085 |
+
6, # gpu_memory_preservation
|
| 1086 |
+
True, # use_teacache
|
| 1087 |
+
False, # no_resize
|
| 1088 |
+
16, # mp4_crf
|
| 1089 |
+
5, # num_clean_frames
|
| 1090 |
+
default_vae
|
| 1091 |
+
],
|
| 1092 |
+
],
|
| 1093 |
+
run_on_click = True,
|
| 1094 |
+
fn = process_video,
|
| 1095 |
+
inputs = ips_video,
|
| 1096 |
+
outputs = [result_video, preview_image, progress_desc, progress_bar, start_button, end_button],
|
| 1097 |
+
cache_examples = True,
|
| 1098 |
+
)
|
| 1099 |
+
|
| 1100 |
gr.Markdown('## Guide')
|
| 1101 |
gr.Markdown("I discourage to use the Text-to-Video feature. You should rather generate an image with Flux and use Image-to-Video. You will save time.")
|
| 1102 |
|