Commit 8aa51f68 authored by AUTOMATIC1111's avatar AUTOMATIC1111
Browse files

fix [Bug]: (Dev Branch) Placing "Dimensions" first in "ui_reorder_list" prevents start #14047

parent 5f36f6ab
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -635,12 +635,6 @@ def create_ui():
                                    scale_by.release(**on_change_args)
                                    scale_by.release(**on_change_args)
                                    button_update_resize_to.click(**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_to.select(fn=lambda: 0, inputs=[], outputs=[selected_scale_tab])
                            tab_scale_by.select(fn=lambda: 1, inputs=[], outputs=[selected_scale_tab])
                            tab_scale_by.select(fn=lambda: 1, inputs=[], outputs=[selected_scale_tab])


@@ -701,6 +695,12 @@ def create_ui():
                    if category not in {"accordions"}:
                    if category not in {"accordions"}:
                        scripts.scripts_img2img.setup_ui_for_section(category)
                        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):
            def select_img2img_tab(tab):
                return gr.update(visible=tab in [2, 3, 4]), gr.update(visible=tab == 3),
                return gr.update(visible=tab in [2, 3, 4]), gr.update(visible=tab == 3),