fix a bug:AttributeError: 'Linear' object has no attribute 'weight_function'

fix a bug:AttributeError: 'Linear' object has no attribute 'weight_function'
This commit is contained in:
qiaoce 2025-02-20 09:22:12 +08:00 committed by GitHub
parent b4d3652d88
commit cc9d669c62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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"):