Skip to content

Commit

Permalink
Fix regression.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Aug 9, 2024
1 parent e172564 commit 6678d5c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions comfy/model_patcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,10 @@ def lowvram_load(self, device_to=None, lowvram_model_memory=0, force_patch_weigh
if hasattr(m, "weight"):
mem_counter += comfy.model_management.module_size(m)
param = list(m.parameters())
weight = param[0]
if weight.device == device_to:
continue
if len(param) > 0:
weight = param[0]
if weight.device == device_to:
continue

self.patch_weight_to_device(weight_key) #TODO: speed this up without OOM
self.patch_weight_to_device(bias_key)
Expand Down

0 comments on commit 6678d5c

Please sign in to comment.