From cc9d669c62b38dc67580fc69bdd98bd2f0ab8700 Mon Sep 17 00:00:00 2001 From: qiaoce <542735830@163.com> Date: Thu, 20 Feb 2025 09:22:12 +0800 Subject: [PATCH] fix a bug:AttributeError: 'Linear' object has no attribute 'weight_function' fix a bug:AttributeError: 'Linear' object has no attribute 'weight_function' --- comfy/model_patcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comfy/model_patcher.py b/comfy/model_patcher.py index 4dbe1b7aa..2c6833202 100644 --- a/comfy/model_patcher.py +++ b/comfy/model_patcher.py @@ -97,7 +97,7 @@ def wipe_lowvram_weight(m): m.comfy_cast_weights = m.prev_comfy_cast_weights del m.prev_comfy_cast_weights - if hasattr(m, "weight_function"): + if not hasattr(m, "weight_function"): m.weight_function = [] if hasattr(m, "bias_function"):