guard against multi-controlnet in hires

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-10-31 18:41:31 -04:00
parent 82b9a9fe3d
commit 372770b285
5 changed files with 13 additions and 3 deletions
+7
View File
@@ -1,5 +1,12 @@
# Change Log for SD.Next
## Update for 2025-11-01
- add inline wildcards using curly braces syntax
- fix inpaint
- fix model type detection
- guard against multi-controlnet in hires
## Update for 2025-10-31
### Highlights for 2025-10-31
+3
View File
@@ -252,6 +252,9 @@ def process_hires(p: processing.StableDiffusionProcessing, output):
# hires runs on original pipeline
if hasattr(shared.sd_model, 'restore_pipeline') and (shared.sd_model.restore_pipeline is not None) and (not shared.opts.control_hires):
shared.sd_model.restore_pipeline()
if (getattr(shared.sd_model, 'controlnet', None) is not None) and ((isinstance(shared.sd_model.controlnet, list) and len(shared.sd_model.controlnet) > 1)) or ('Multi' in type(shared.sd_model.controlnet).__name__):
shared.log.warning(f'Process: control={type(shared.sd_model.controlnet)} not supported in hires')
return output
# upscale
if hasattr(p, 'height') and hasattr(p, 'width') and p.hr_resize_mode > 0 and (p.hr_upscaler != 'None' or p.hr_resize_mode == 5):
+1 -1
View File
@@ -255,7 +255,7 @@ def create_ui_elements(units, result_txt, preview_process):
with gr.Accordion('Global', open=True, elem_classes=['processor-settings']):
control_hires = gr.Checkbox(label="Use control during hires", value=shared.opts.control_hires, elem_id='control_hires')
def set_control_hires(value):
shared.opts.control_active = value
shared.opts.control_hires = value
control_hires.change(fn=set_control_hires, inputs=[control_hires], outputs=[])
control_max_units = gr.Slider(label="Maximum units", minimum=1, maximum=10, step=1, value=shared.opts.control_max_units, elem_id='control_max_units')
def set_control_max_units(value):
+1 -1
Submodule wiki updated: 847eae26c7...213bdc8365