Closed emorris00 closed 9 months ago
Yea. I do notice that we should probably delay the register of all callbacks when all ui elements are rendered. https://github.com/Mikubill/sd-webui-controlnet/issues/2270 is also blocked on this issue, as the sd_model checkpoint selection is also created after ControlNet ui code's execution.
Is there an existing issue for this?
What happened?
If you change the 'UI item order for txt2img/img2img tabs' setting and place the dimensions after scripts then the UI breaks and you have to manually change the config.json to fix it.
Steps to reproduce the problem
What should have happened?
The UI should not completely break.
Commit where the problem happens
webui: cf2772fab0af5573da775e7437e6acdca424f26e controlnet: ba05e1ea20df0e29a3dce9fcbe3ecc30777a5271
What browsers do you use to access the UI ?
Mozilla Firefox, Microsoft Edge
Command Line Arguments
List of enabled extensions
LDSR Lora ScuNET SwinIR canvas-zoom-and-pan extra-options-section hypertile mobile prompt-bracket-checker Stable-Diffusion-Webui-Civitai-Helper openpose-editor sd-webui-controlnet sd-webui-lobe-theme stable-diffusion-webui-images-browser
Console logs
Additional information
This seems to be happening because if the dimensions box is before the controlnet box then controlnet_ui_group.py sets the outputs of the send_dimen_button to [None, None]. This is because the sliders are set in the on_after_component callback at lines 1223-1237 and those sliders haven't been created yet so the callback for them hasn't happened yet. So should be able to create a callback for when those sliders are set similar to subscribe_for_batch_dir + img2img_batch_input_dir_callbacks.