Commit ·
ca1a6be
1
Parent(s): b7fde17
resimplify data structure for generate_video
Browse files- gradio_server.py +31 -32
gradio_server.py
CHANGED
|
@@ -2284,44 +2284,43 @@ def generate_video_tab(image2video=False):
|
|
| 2284 |
refresh_lora_btn2.click(refresh_lora_list, inputs=[state, lset_name,loras_choices], outputs=[lset_name, loras_choices])
|
| 2285 |
download_loras_btn.click(fn=download_loras, inputs=[], outputs=[download_status_row, download_status, presets_column, loras_column]).then(fn=refresh_lora_list, inputs=[state, lset_name,loras_choices], outputs=[lset_name, loras_choices])
|
| 2286 |
output.select(select_video, state, None )
|
| 2287 |
-
original_inputs = [
|
| 2288 |
-
prompt,
|
| 2289 |
-
negative_prompt,
|
| 2290 |
-
resolution,
|
| 2291 |
-
video_length,
|
| 2292 |
-
seed,
|
| 2293 |
-
num_inference_steps,
|
| 2294 |
-
guidance_scale,
|
| 2295 |
-
flow_shift,
|
| 2296 |
-
embedded_guidance_scale,
|
| 2297 |
-
repeat_generation,
|
| 2298 |
-
multi_images_gen_type,
|
| 2299 |
-
tea_cache_setting,
|
| 2300 |
-
tea_cache_start_step_perc,
|
| 2301 |
-
loras_choices,
|
| 2302 |
-
loras_mult_choices,
|
| 2303 |
-
image_prompt_type_radio,
|
| 2304 |
-
image_to_continue,
|
| 2305 |
-
image_to_end,
|
| 2306 |
-
video_to_continue,
|
| 2307 |
-
max_frames,
|
| 2308 |
-
RIFLEx_setting,
|
| 2309 |
-
slg_switch,
|
| 2310 |
-
slg_layers,
|
| 2311 |
-
slg_start_perc,
|
| 2312 |
-
slg_end_perc,
|
| 2313 |
-
cfg_star_switch,
|
| 2314 |
-
cfg_zero_step,
|
| 2315 |
-
state,
|
| 2316 |
-
gr.State(image2video)
|
| 2317 |
-
]
|
| 2318 |
|
| 2319 |
#generate_btn.click(
|
| 2320 |
# fn=validate_wizard_prompt, inputs =[state, wizard_prompt_activated_var, wizard_variables_var, prompt, wizard_prompt, *prompt_vars] , outputs= [prompt]
|
| 2321 |
#).then(
|
| 2322 |
generate_btn.click(
|
| 2323 |
fn=process_prompt_and_add_tasks,
|
| 2324 |
-
inputs=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2325 |
outputs=queue_df
|
| 2326 |
)
|
| 2327 |
close_modal_button.click(
|
|
|
|
| 2284 |
refresh_lora_btn2.click(refresh_lora_list, inputs=[state, lset_name,loras_choices], outputs=[lset_name, loras_choices])
|
| 2285 |
download_loras_btn.click(fn=download_loras, inputs=[], outputs=[download_status_row, download_status, presets_column, loras_column]).then(fn=refresh_lora_list, inputs=[state, lset_name,loras_choices], outputs=[lset_name, loras_choices])
|
| 2286 |
output.select(select_video, state, None )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2287 |
|
| 2288 |
#generate_btn.click(
|
| 2289 |
# fn=validate_wizard_prompt, inputs =[state, wizard_prompt_activated_var, wizard_variables_var, prompt, wizard_prompt, *prompt_vars] , outputs= [prompt]
|
| 2290 |
#).then(
|
| 2291 |
generate_btn.click(
|
| 2292 |
fn=process_prompt_and_add_tasks,
|
| 2293 |
+
inputs=[
|
| 2294 |
+
prompt,
|
| 2295 |
+
negative_prompt,
|
| 2296 |
+
resolution,
|
| 2297 |
+
video_length,
|
| 2298 |
+
seed,
|
| 2299 |
+
num_inference_steps,
|
| 2300 |
+
guidance_scale,
|
| 2301 |
+
flow_shift,
|
| 2302 |
+
embedded_guidance_scale,
|
| 2303 |
+
repeat_generation,
|
| 2304 |
+
multi_images_gen_type,
|
| 2305 |
+
tea_cache_setting,
|
| 2306 |
+
tea_cache_start_step_perc,
|
| 2307 |
+
loras_choices,
|
| 2308 |
+
loras_mult_choices,
|
| 2309 |
+
image_prompt_type_radio,
|
| 2310 |
+
image_to_continue,
|
| 2311 |
+
image_to_end,
|
| 2312 |
+
video_to_continue,
|
| 2313 |
+
max_frames,
|
| 2314 |
+
RIFLEx_setting,
|
| 2315 |
+
slg_switch,
|
| 2316 |
+
slg_layers,
|
| 2317 |
+
slg_start_perc,
|
| 2318 |
+
slg_end_perc,
|
| 2319 |
+
cfg_star_switch,
|
| 2320 |
+
cfg_zero_step,
|
| 2321 |
+
state,
|
| 2322 |
+
gr.State(image2video)
|
| 2323 |
+
],
|
| 2324 |
outputs=queue_df
|
| 2325 |
)
|
| 2326 |
close_modal_button.click(
|