diff options
author | ezxzeng <zhixuan.zeng@gmail.com> | 2023-11-07 20:25:27 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-07 20:25:27 +0000 |
commit | f9c14a8c8c8b682c2a7f7a11306b26e2a28ebeec (patch) | |
tree | 1c7f6abc11bd2aacd2a0d16a0b7db1963c9b26cd /modules/ui_common.py | |
parent | 759515316e8ec536f34fad616e8c6a33674a164b (diff) | |
parent | 5e80d9ee99c5899e5e2b130408ffb65a0585a62a (diff) | |
download | stable-diffusion-webui-gfx803-f9c14a8c8c8b682c2a7f7a11306b26e2a28ebeec.tar.gz stable-diffusion-webui-gfx803-f9c14a8c8c8b682c2a7f7a11306b26e2a28ebeec.tar.bz2 stable-diffusion-webui-gfx803-f9c14a8c8c8b682c2a7f7a11306b26e2a28ebeec.zip |
Merge branch 'dev' into ui_mobile_optimizations
Diffstat (limited to 'modules/ui_common.py')
-rw-r--r-- | modules/ui_common.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/modules/ui_common.py b/modules/ui_common.py index 84a7d7f2..032ec4af 100644 --- a/modules/ui_common.py +++ b/modules/ui_common.py @@ -104,7 +104,7 @@ def save_files(js_data, images, do_make_zip, index): return gr.File.update(value=fullfns, visible=True), plaintext_to_html(f"Saved: {filenames[0]}")
-def create_output_panel(tabname, outdir):
+def create_output_panel(tabname, outdir, toprow=None):
def open_folder(f):
if not os.path.exists(f):
@@ -130,12 +130,15 @@ Requested path was: {f} else:
sp.Popen(["xdg-open", path])
- with gr.Column(variant='panel', elem_id=f"{tabname}_results"):
- with gr.Group(elem_id=f"{tabname}_gallery_container"):
- result_gallery = gr.Gallery(label='Output', show_label=False, elem_id=f"{tabname}_gallery", columns=4, preview=True, height=shared.opts.gallery_height or None)
+ with gr.Column(elem_id=f"{tabname}_results"):
+ if toprow:
+ toprow.create_inline_toprow_image()
- generation_info = None
- with gr.Column():
+ with gr.Column(variant='panel', elem_id=f"{tabname}_results_panel"):
+ with gr.Group(elem_id=f"{tabname}_gallery_container"):
+ result_gallery = gr.Gallery(label='Output', show_label=False, elem_id=f"{tabname}_gallery", columns=4, preview=True, height=shared.opts.gallery_height or None)
+
+ generation_info = None
with gr.Row(elem_id=f"image_buttons_{tabname}", elem_classes="image-buttons"):
open_folder_button = ToolButton(folder_symbol, elem_id=f'{tabname}_open_folder', visible=not shared.cmd_opts.hide_ui_dir_config, tooltip="Open images output directory.")
|