Use generate button as progress bar

This commit is contained in:
innovaciones 2022-09-21 12:51:23 -05:00 committed by AUTOMATIC1111
parent 12622105dc
commit 70e39f6cfe

View file

@ -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')