Skip to content

Commit b6a9e16

Browse files
committed
fix ui_functions.change_image_editor_mode by adding gr.update to the end of the list it returns
1 parent 0b6164d commit b6a9e16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/webui.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2126,8 +2126,8 @@ def run_RealESRGAN(image, model_name: str):
21262126

21272127
def change_image_editor_mode(choice, cropped_image, mask, resize_mode, width, height):
21282128
if choice == "Mask":
2129-
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)]
2130-
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)]
2129+
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)]
2130+
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)]
21312131

21322132
def update_image_mask(cropped_image, resize_mode, width, height):
21332133
resized_cropped_image = resize_image(resize_mode, cropped_image, width, height) if cropped_image else None

0 commit comments

Comments
 (0)