@@ -635,12 +635,6 @@ def copy_image(img):
635
635
scale_by .release (** on_change_args )
636
636
button_update_resize_to .click (** on_change_args )
637
637
638
- # the code below is meant to update the resolution label after the image in the image selection UI has changed.
639
- # as it is now the event keeps firing continuously for inpaint edits, which ruins the page with constant requests.
640
- # I assume this must be a gradio bug and for now we'll just do it for non-inpaint inputs.
641
- for component in [init_img , sketch ]:
642
- component .change (fn = lambda : None , _js = "updateImg2imgResizeToTextAfterChangingImage" , inputs = [], outputs = [], show_progress = False )
643
-
644
638
tab_scale_to .select (fn = lambda : 0 , inputs = [], outputs = [selected_scale_tab ])
645
639
tab_scale_by .select (fn = lambda : 1 , inputs = [], outputs = [selected_scale_tab ])
646
640
@@ -701,6 +695,12 @@ def copy_image(img):
701
695
if category not in {"accordions" }:
702
696
scripts .scripts_img2img .setup_ui_for_section (category )
703
697
698
+ # the code below is meant to update the resolution label after the image in the image selection UI has changed.
699
+ # as it is now the event keeps firing continuously for inpaint edits, which ruins the page with constant requests.
700
+ # I assume this must be a gradio bug and for now we'll just do it for non-inpaint inputs.
701
+ for component in [init_img , sketch ]:
702
+ component .change (fn = lambda : None , _js = "updateImg2imgResizeToTextAfterChangingImage" , inputs = [], outputs = [], show_progress = False )
703
+
704
704
def select_img2img_tab (tab ):
705
705
return gr .update (visible = tab in [2 , 3 , 4 ]), gr .update (visible = tab == 3 ),
706
706
0 commit comments