diff --git a/modules/ui.py b/modules/ui.py index baf4c3977..9c7a67dd5 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -750,10 +750,10 @@ def create_ui(wrap_gradio_gpu_call): with gr.Tabs(elem_id="mode_img2img") as tabs_img2img_mode: with gr.TabItem('img2img', id='img2img'): - init_img = gr.Image(label="Image for img2img", elem_id="img2img_image", show_label=False, source="upload", interactive=True, type="pil", tool=cmd_opts.gradio_img2img_tool) + init_img = gr.Image(label="Image for img2img", elem_id="img2img_image", show_label=False, source="upload", interactive=True, type="pil", tool=cmd_opts.gradio_img2img_tool).style(height=480) with gr.TabItem('Inpaint', id='inpaint'): - init_img_with_mask = gr.Image(label="Image for inpainting with mask", show_label=False, elem_id="img2maskimg", source="upload", interactive=True, type="pil", tool="sketch", image_mode="RGBA") + init_img_with_mask = gr.Image(label="Image for inpainting with mask", show_label=False, elem_id="img2maskimg", source="upload", interactive=True, type="pil", tool="sketch", image_mode="RGBA").style(height=480) init_img_inpaint = gr.Image(label="Image for img2img", show_label=False, source="upload", interactive=True, type="pil", visible=False, elem_id="img_inpaint_base") init_mask_inpaint = gr.Image(label="Mask", source="upload", interactive=True, type="pil", visible=False, elem_id="img_inpaint_mask") diff --git a/style.css b/style.css index 2306c0024..c27e53f82 100644 --- a/style.css +++ b/style.css @@ -167,10 +167,6 @@ button{ align-self: stretch !important; } -#img2maskimg .h-60{ - height: 30rem; -} - .overflow-hidden, .gr-panel{ overflow: visible !important; } @@ -443,10 +439,6 @@ input[type="range"]{ --tw-bg-opacity: 0 !important; } -#img2img_image div.h-60{ - height: 480px; -} - #context-menu{ z-index:9999; position:absolute; @@ -521,3 +513,11 @@ canvas[key="mask"] { .row.gr-compact{ overflow: visible; } + +#img2img_image, #img2img_image > .h-60, #img2img_image > .h-60 > div, #img2img_image > .h-60 > div > img, +img2maskimg, #img2maskimg > .h-60, #img2maskimg > .h-60 > div, #img2maskimg > .h-60 > div > img +{ + height: 480px !important; + max-height: 480px !important; + min-height: 480px !important; +} \ No newline at end of file