Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Better fix for lowvram issue.

comfyanonymousa3cc3267489b
diff --git a/comfy/model_patcher.py b/comfy/model_patcher.py
index 5577ca4bf..56e85f990 100644
--- a/comfy/model_patcher.py
+++ b/comfy/model_patcher.py
@@ -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