Better fix for lowvram issue.

This commit is contained in:
comfyanonymous 2024-08-09 12:16:25 -04:00
parent 86a97e91fc
commit a3cc326748
1 changed files with 2 additions and 2 deletions

View File

@ -393,9 +393,9 @@ class ModelPatcher:
if m.comfy_cast_weights:
wipe_lowvram_weight(m)
param = list(m.parameters())
if len(param) > 0:
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