Skip to content

Commit a3cc326

Browse files
Better fix for lowvram issue.
1 parent 86a97e9 commit a3cc326

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

comfy/model_patcher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,9 @@ def lowvram_load(self, device_to=None, lowvram_model_memory=0, force_patch_weigh
393393
if m.comfy_cast_weights:
394394
wipe_lowvram_weight(m)
395395

396-
param = list(m.parameters())
397-
if len(param) > 0:
396+
if hasattr(m, "weight"):
398397
mem_counter += comfy.model_management.module_size(m)
398+
param = list(m.parameters())
399399
weight = param[0]
400400
if weight.device == device_to:
401401
continue

0 commit comments

Comments
 (0)