Skip to content

Commit

Permalink
fix [Bug]: (Dev Branch) Placing "Dimensions" first in "ui_reorder_lis…
Browse files Browse the repository at this point in the history
…t" prevents start AUTOMATIC1111#14047
  • Loading branch information
AUTOMATIC1111 authored and ruchej committed Sep 30, 2024
1 parent 7985043 commit a4b5d2d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions modules/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,12 +635,6 @@ def copy_image(img):
scale_by.release(**on_change_args)
button_update_resize_to.click(**on_change_args)

# 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])
tab_scale_by.select(fn=lambda: 1, inputs=[], outputs=[selected_scale_tab])

Expand Down Expand Up @@ -701,6 +695,12 @@ def copy_image(img):
if category not in {"accordions"}:
scripts.scripts_img2img.setup_ui_for_section(category)

# 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)

def select_img2img_tab(tab):
return gr.update(visible=tab in [2, 3, 4]), gr.update(visible=tab == 3),

Expand Down

0 comments on commit a4b5d2d

Please sign in to comment.