mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-30 05:23:37 +08:00
fix: continue instead of break for parametrizations entries
Skip parametrizations.* entries and continue checking remaining params so mixed modules with both parametrized and non-parametrized children are correctly classified.
This commit is contained in:
parent
78501b11c3
commit
1368c20d88
@ -736,8 +736,9 @@ class ModelPatcher:
|
|||||||
params = { name: param for name, param in m.named_parameters(recurse=False) }
|
params = { name: param for name, param in m.named_parameters(recurse=False) }
|
||||||
for name, param in m.named_parameters(recurse=True):
|
for name, param in m.named_parameters(recurse=True):
|
||||||
if name not in params:
|
if name not in params:
|
||||||
if not name.startswith("parametrizations."):
|
if name.startswith("parametrizations."):
|
||||||
default = True # default random weights in non leaf modules
|
continue
|
||||||
|
default = True # default random weights in non leaf modules
|
||||||
break
|
break
|
||||||
if default and default_device is not None:
|
if default and default_device is not None:
|
||||||
for param_name, param in params.items():
|
for param_name, param in params.items():
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user