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 <noreply@anthropic.com>
This commit is contained in:
QualiaRain
2026-06-15 00:04:41 -04:00
parent d227a46406
commit bbbb450884
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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)