call submit_txt2vid

pull/130/head
kabachuha 2023-04-21 14:52:14 +03:00
parent ff8ca64f50
commit baa856bc94
2 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@ def run(*args):
vids_pack = [dataurl]
component_names = t2v_helpers_args.get_component_names()
# TODO: change to i+2 when we will add the progress bar
args_dict = {component_names[i]: args[i+0] for i in range(0, len(component_names))}
args_dict = {component_names[i]: args[i+2] for i in range(0, len(component_names))}
model_type = args_dict['model_type']
t2v_helpers_args.i1_store_t2v = f'<p style=\"font-weight:bold;margin-bottom:0em\">text2video extension for auto1111 — version 1.2b </p><video controls loop><source src="{dataurl}" type="video/mp4"></video>'
keep_pipe_in_vram = opts.data.get("modelscope_deforum_keep_model_in_vram") if opts.data is not None and opts.data.get("modelscope_deforum_keep_model_in_vram") is not None else 'None'

View File

@ -37,7 +37,7 @@ def on_ui_tabs():
with gr.Column(scale=1, variant='panel'):
components = setup_text2video_settings_dictionary()
with gr.Column(scale=1, variant='compact'):
with gr.Row(variant='compact'):
with gr.Row(elem_id=f"text2vid_generate_box", variant='compact', elem_classes="generate-box"):
interrupt = gr.Button('Interrupt', elem_id=f"text2vid_interrupt", elem_classes="generate-box-interrupt")
skip = gr.Button('Skip', elem_id=f"text2vid_skip", elem_classes="generate-box-skip")
run_button = gr.Button('Generate', elem_id=f"text2vid_generate", variant='primary')
@ -75,8 +75,8 @@ def on_ui_tabs():
run_button.click(
# , extra_outputs=[None, '', '']),
fn=wrap_gradio_gpu_call(process),
# _js="submit_deforum",
inputs=[components[name] for name in args.get_component_names()],
_js="submit_txt2vid",
inputs=[dummy_component1, dummy_component2] + [components[name] for name in args.get_component_names()],
outputs=[
dummy_component1, dummy_component2,
],