From 70e39f6cfea215197db7b1298ab4c45d5c03a40d Mon Sep 17 00:00:00 2001 From: innovaciones Date: Wed, 21 Sep 2022 12:51:23 -0500 Subject: [PATCH] Use generate button as progress bar --- modules/ui.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/ui.py b/modules/ui.py index e3cd7f3a..88b6ec30 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -350,7 +350,11 @@ def create_toprow(is_img2img): with gr.Column(scale=1): with gr.Row(): + progressbar = gr.HTML(elem_id="progressbar") submit = gr.Button('Generate', elem_id="generate", variant='primary') + + txt2img_preview = gr.Image(elem_id='txt2img_preview', visible=False) + setup_progressbar(progressbar, txt2img_preview) with gr.Row(): if is_img2img: @@ -416,14 +420,11 @@ def create_ui(txt2img, img2img, run_extras, run_pnginfo): custom_inputs = modules.scripts.scripts_txt2img.setup_ui(is_img2img=False) with gr.Column(variant='panel'): - progressbar = gr.HTML(elem_id="progressbar") with gr.Group(): txt2img_preview = gr.Image(elem_id='txt2img_preview', visible=False) txt2img_gallery = gr.Gallery(label='Output', elem_id='txt2img_gallery').style(grid=4) - setup_progressbar(progressbar, txt2img_preview) - with gr.Group(): with gr.Row(): save = gr.Button('Save')