couple of UI tweaks (#2626)

* sensible height for PNGInfo
* use Gradio Image in Extras tab to preserve infotext when loading
This commit is contained in:
DenOfEquity
2025-02-06 14:08:11 +00:00
committed by GitHub
parent a2302538b0
commit 21c907ef87
2 changed files with 4 additions and 4 deletions

View File

@@ -921,13 +921,13 @@ def create_ui():
scripts.scripts_current = None
with gr.Blocks(analytics_enabled=False, head=canvas_head) as extras_interface:
with gr.Blocks(analytics_enabled=False) as extras_interface:
ui_postprocessing.create_ui()
with gr.Blocks(analytics_enabled=False, head=canvas_head) as pnginfo_interface:
with gr.Blocks(analytics_enabled=False) as pnginfo_interface:
with ResizeHandleRow(equal_height=False):
with gr.Column(variant='panel'):
image = gr.Image(elem_id="pnginfo_image", label="Source", source="upload", interactive=True, type="pil")
image = gr.Image(elem_id="pnginfo_image", label="Source", source="upload", interactive=True, type="pil", height="50vh")
with gr.Column(variant='panel'):
html = gr.HTML()

View File

@@ -13,7 +13,7 @@ def create_ui():
with gr.Column(variant='compact'):
with gr.Tabs(elem_id="mode_extras"):
with gr.TabItem('Single Image', id="single_image", elem_id="extras_single_tab") as tab_single:
extras_image = ForgeCanvas(elem_id="extras_image", height=512, no_scribbles=True).background
extras_image = gr.Image(label="Source", interactive=True, type="pil", elem_id="extras_image", image_mode="RGBA", height="55vh")
with gr.TabItem('Batch Process', id="batch_process", elem_id="extras_batch_process_tab") as tab_batch:
image_batch = gr.Files(label="Batch Process", interactive=True, elem_id="extras_image_batch")