From b6a9e16bf90756e5463796687382e25e5c05fe58 Mon Sep 17 00:00:00 2001 From: xaedes Date: Fri, 9 Sep 2022 19:03:59 +0200 Subject: [PATCH] fix ui_functions.change_image_editor_mode by adding gr.update to the end of the list it returns --- scripts/webui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/webui.py b/scripts/webui.py index 97b9b72..7f81201 100644 --- a/scripts/webui.py +++ b/scripts/webui.py @@ -2126,8 +2126,8 @@ img2img_image_mode = 'sketch' def change_image_editor_mode(choice, cropped_image, mask, resize_mode, width, height): if choice == "Mask": - return [gr.update(visible=False), gr.update(visible=True), gr.update(visible=False), gr.update(visible=True), gr.update(visible=False), gr.update(visible=False), gr.update(visible=True), gr.update(visible=True)] - return [gr.update(visible=True), gr.update(visible=False), gr.update(visible=True), gr.update(visible=False), gr.update(visible=True), gr.update(visible=True), gr.update(visible=False), gr.update(visible=False)] + return [gr.update(visible=False), gr.update(visible=True), gr.update(visible=False), gr.update(visible=True), gr.update(visible=False), gr.update(visible=False), gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)] + return [gr.update(visible=True), gr.update(visible=False), gr.update(visible=True), gr.update(visible=False), gr.update(visible=True), gr.update(visible=True), gr.update(visible=False), gr.update(visible=False), gr.update(visible=False)] def update_image_mask(cropped_image, resize_mode, width, height): resized_cropped_image = resize_image(resize_mode, cropped_image, width, height) if cropped_image else None