From 15ec54dd969d6dc3fea7790ca5cce5badcfda426 Mon Sep 17 00:00:00 2001 From: AUTOMATIC1111 <16777216c@gmail.com> Date: Thu, 4 Jan 2024 19:47:00 +0300 Subject: Have upscale button use the same seed as hires fix. --- modules/ui_common.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'modules/ui_common.py') diff --git a/modules/ui_common.py b/modules/ui_common.py index ff84197c..f17259c2 100644 --- a/modules/ui_common.py +++ b/modules/ui_common.py @@ -108,8 +108,8 @@ def save_files(js_data, images, do_make_zip, index): @dataclasses.dataclass class OutputPanel: gallery = None + generation_info = None infotext = None - html_info = None html_log = None button_upscale = None @@ -175,17 +175,17 @@ Requested path was: {f} download_files = gr.File(None, file_count="multiple", interactive=False, show_label=False, visible=False, elem_id=f'download_files_{tabname}') with gr.Group(): - res.html_info = gr.HTML(elem_id=f'html_info_{tabname}', elem_classes="infotext") + res.infotext = gr.HTML(elem_id=f'html_info_{tabname}', elem_classes="infotext") res.html_log = gr.HTML(elem_id=f'html_log_{tabname}', elem_classes="html-log") - res.infotext = gr.Textbox(visible=False, elem_id=f'generation_info_{tabname}') + res.generation_info = gr.Textbox(visible=False, elem_id=f'generation_info_{tabname}') if tabname == 'txt2img' or tabname == 'img2img': generation_info_button = gr.Button(visible=False, elem_id=f"{tabname}_generation_info_button") generation_info_button.click( fn=update_generation_info, _js="function(x, y, z){ return [x, y, selected_gallery_index()] }", - inputs=[res.infotext, res.html_info, res.html_info], - outputs=[res.html_info, res.html_info], + inputs=[res.generation_info, res.infotext, res.infotext], + outputs=[res.infotext, res.infotext], show_progress=False, ) @@ -193,10 +193,10 @@ Requested path was: {f} fn=call_queue.wrap_gradio_call(save_files), _js="(x, y, z, w) => [x, y, false, selected_gallery_index()]", inputs=[ - res.infotext, + res.generation_info, res.gallery, - res.html_info, - res.html_info, + res.infotext, + res.infotext, ], outputs=[ download_files, @@ -209,10 +209,10 @@ Requested path was: {f} fn=call_queue.wrap_gradio_call(save_files), _js="(x, y, z, w) => [x, y, true, selected_gallery_index()]", inputs=[ - res.infotext, + res.generation_info, res.gallery, - res.html_info, - res.html_info, + res.infotext, + res.infotext, ], outputs=[ download_files, @@ -221,8 +221,8 @@ Requested path was: {f} ) else: - res.infotext = gr.HTML(elem_id=f'html_info_x_{tabname}') - res.html_info = gr.HTML(elem_id=f'html_info_{tabname}', elem_classes="infotext") + res.generation_info = gr.HTML(elem_id=f'html_info_x_{tabname}') + res.infotext = gr.HTML(elem_id=f'html_info_{tabname}', elem_classes="infotext") res.html_log = gr.HTML(elem_id=f'html_log_{tabname}') paste_field_names = [] -- cgit v1.2.3