mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-30 13:33:42 +08:00
fix: include weight_norm parametrizations in partial loading (#11855)
Root cause: _load_list() treated parametrized (weight_norm) params missing from recurse=False as default random weights, skipping GPU loading.
This commit is contained in:
parent
379fbd1a82
commit
78501b11c3
@ -736,7 +736,8 @@ class ModelPatcher:
|
||||
params = { name: param for name, param in m.named_parameters(recurse=False) }
|
||||
for name, param in m.named_parameters(recurse=True):
|
||||
if name not in params:
|
||||
default = True # default random weights in non leaf modules
|
||||
if not name.startswith("parametrizations."):
|
||||
default = True # default random weights in non leaf modules
|
||||
break
|
||||
if default and default_device is not None:
|
||||
for param_name, param in params.items():
|
||||
|
||||
Loading…
Reference in New Issue
Block a user