mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
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:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user