From bbbb4508843cc24cd361edb7fdb84ee4c81c66a2 Mon Sep 17 00:00:00 2001 From: QualiaRain <44004657+QualiaRain@users.noreply.github.com> Date: Mon, 15 Jun 2026 00:04:41 -0400 Subject: [PATCH] fix(control-units): list zimage controlnets under 'all'; fix LLLite output-block fall-through api_list_models omitted the 'or model_type == all' clause for zimage, so ZImage ControlNets never appeared in the all listing - added it to match every other family. lite_model used pass for the unimplemented root==output branch, which fell through to b = getattr(b, attn_name) with b unbound or stale from a prior iteration (UnboundLocalError or wrong-block patch); use continue to skip it. Co-Authored-By: Claude --- modules/control/units/controlnet.py | 2 +- modules/control/units/lite_model.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/control/units/controlnet.py b/modules/control/units/controlnet.py index 8efbce5a5..96175a33b 100644 --- a/modules/control/units/controlnet.py +++ b/modules/control/units/controlnet.py @@ -179,7 +179,7 @@ def api_list_models(model_type: str | None = None): model_list += list(predefined_qwen) if model_type == 'hunyuandit' or model_type == 'all': model_list += list(predefined_hunyuandit) - if model_type == 'zimage': + if model_type == 'zimage' or model_type == 'all': model_list += list(predefined_zimage) model_list += sorted(find_models()) return model_list diff --git a/modules/control/units/lite_model.py b/modules/control/units/lite_model.py index ef6d444f9..3095d7cfe 100644 --- a/modules/control/units/lite_model.py +++ b/modules/control/units/lite_model.py @@ -171,7 +171,7 @@ class ControlNetLLLite(torch.nn.Module): # pylint: disable=abstract-method mapped_block, mapped_number = map_down_lllite_to_unet[int(block)] b = model.down_blocks[mapped_block].attentions[int(mapped_number)].transformer_blocks[int(block_number)] elif root == 'output': - pass # not implemented + continue # not implemented else: b = model.mid_block.attentions[0].transformer_blocks[int(block_number)] b = getattr(b, attn_name, None)