From d01dc111a8057379c90f44c502bf44e15fcd386d Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 8 Sep 2025 15:40:58 -0400 Subject: [PATCH] reduce ui updates Signed-off-by: Vladimir Mandic --- modules/ui_control.py | 4 ++-- modules/ui_sections.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/ui_control.py b/modules/ui_control.py index c1027d044..a2621944b 100644 --- a/modules/ui_control.py +++ b/modules/ui_control.py @@ -547,7 +547,7 @@ def create_ui(_blocks: gr.Blocks=None): for u in units: controls.extend(u.controls) btn_update = gr.Button('Update', interactive=True, visible=False, elem_id='control_update') - btn_update.click(fn=get_units, inputs=controls, outputs=[], show_progress=True, queue=False) + btn_update.click(fn=get_units, inputs=controls, outputs=[], show_progress=False, queue=False) show_input.change(fn=lambda x: gr.update(visible=x), inputs=[show_input], outputs=[column_input]) show_preview.change(fn=lambda x: gr.update(visible=x), inputs=[show_preview], outputs=[column_preview]) @@ -561,7 +561,7 @@ def create_ui(_blocks: gr.Blocks=None): _js="controlInputMode", inputs=[input_mode, input_image, init_image, input_type, input_resize, input_inpaint, input_video, input_batch, input_folder], outputs=[output_tabs, preview_process, result_txt, width_before, height_before], - show_progress=True, + show_progress=False, queue=False, ) diff --git a/modules/ui_sections.py b/modules/ui_sections.py index 5dd635ab9..07ce95b3c 100644 --- a/modules/ui_sections.py +++ b/modules/ui_sections.py @@ -57,9 +57,9 @@ def create_toprow(is_img2img: bool = False, id_part: str = None, generate_visibl styles_btn_select = ToolButton('Select', elem_id=f"{id_part}_styles_select", visible=False) styles_btn_apply = ToolButton(ui_symbols.style_apply, elem_id=f"{id_part}_styles_apply", visible=True) styles_btn_save = ToolButton(ui_symbols.style_save, elem_id=f"{id_part}_styles_save", visible=True) - styles_btn_select.click(_js="applyStyles", fn=parse_style, inputs=[styles], outputs=[styles]) - styles_btn_apply.click(fn=apply_styles, inputs=[prompt, negative_prompt, styles], outputs=[prompt, negative_prompt, styles]) - styles_btn_save.click(fn=lambda: None, _js='() => quickSaveStyle()', inputs=[], outputs=[]) + styles_btn_select.click(_js="applyStyles", fn=parse_style, inputs=[styles], outputs=[styles], show_progress=False) + styles_btn_apply.click(fn=apply_styles, inputs=[prompt, negative_prompt, styles], outputs=[prompt, negative_prompt, styles], show_progress=False) + styles_btn_save.click(fn=lambda: None, _js='() => quickSaveStyle()', inputs=[], outputs=[], show_progress=False) return prompt, styles, negative_prompt, submit, reprocess, button_paste, button_extra, token_counter, token_button, negative_token_counter, negative_token_button