Commit 70e39f6c authored by innovaciones's avatar innovaciones Committed by AUTOMATIC1111

Use generate button as progress bar

parent 12622105
...@@ -350,8 +350,12 @@ def create_toprow(is_img2img): ...@@ -350,8 +350,12 @@ def create_toprow(is_img2img):
with gr.Column(scale=1): with gr.Column(scale=1):
with gr.Row(): with gr.Row():
progressbar = gr.HTML(elem_id="progressbar")
submit = gr.Button('Generate', elem_id="generate", variant='primary') 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(): with gr.Row():
if is_img2img: if is_img2img:
interrogate = gr.Button('Interrogate', elem_id="interrogate") interrogate = gr.Button('Interrogate', elem_id="interrogate")
...@@ -416,14 +420,11 @@ def create_ui(txt2img, img2img, run_extras, run_pnginfo): ...@@ -416,14 +420,11 @@ def create_ui(txt2img, img2img, run_extras, run_pnginfo):
custom_inputs = modules.scripts.scripts_txt2img.setup_ui(is_img2img=False) custom_inputs = modules.scripts.scripts_txt2img.setup_ui(is_img2img=False)
with gr.Column(variant='panel'): with gr.Column(variant='panel'):
progressbar = gr.HTML(elem_id="progressbar")
with gr.Group(): with gr.Group():
txt2img_preview = gr.Image(elem_id='txt2img_preview', visible=False) txt2img_preview = gr.Image(elem_id='txt2img_preview', visible=False)
txt2img_gallery = gr.Gallery(label='Output', elem_id='txt2img_gallery').style(grid=4) txt2img_gallery = gr.Gallery(label='Output', elem_id='txt2img_gallery').style(grid=4)
setup_progressbar(progressbar, txt2img_preview)
with gr.Group(): with gr.Group():
with gr.Row(): with gr.Row():
save = gr.Button('Save') save = gr.Button('Save')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment