From f15b7e52e33de1f0e2fcd99c9d4204ebb0fef536 Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Mon, 1 May 2023 13:47:46 +0300 Subject: [PATCH 1/2] Add a comment and partial fix for the issue when the inpaint UI is unresponsive after using it. --- modules/ui.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/ui.py b/modules/ui.py index 9ff4bcd9c..7b45f1319 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -810,7 +810,10 @@ def create_ui(): scale_by.release(**on_change_args) button_update_resize_to.click(**on_change_args) - for component in img2img_image_inputs: + # the code below is meant to update the resolution label after the image in the image selection UI has changed. + # as it is now the event keeps firing continuously for inpaint edits, which ruins the page with constant requests. + # I assume this must be a gradio bug and for now we'll just do it for non-inpaint inputs. + for component in [init_img, sketch]: component.change(fn=lambda: None, _js="updateImg2imgResizeToTextAfterChangingImage", inputs=[], outputs=[], show_progress=False) tab_scale_to.select(fn=lambda: 0, inputs=[], outputs=[selected_scale_tab]) From 67f5c2abb0a9293245de5f00f0b8cd82e2a7cdd0 Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Mon, 1 May 2023 13:58:10 +0300 Subject: [PATCH 2/2] make it impossible to press the restore progress button after pressing it once --- javascript/ui.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/javascript/ui.js b/javascript/ui.js index e14b33f5b..42de91143 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -208,6 +208,8 @@ function submit_img2img(){ } function restoreProgressTxt2img(x){ + showRestoreProgressButton("txt2img", false) + id = localStorage.getItem("txt2img_task_id") if(id) { @@ -219,6 +221,8 @@ function restoreProgressTxt2img(x){ return [id] } function restoreProgressImg2img(x){ + showRestoreProgressButton("img2img", false) + id = localStorage.getItem("img2img_task_id") if(id) {