mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-04-20 03:13:30 +00:00
fix the bug 'Linear' object has no attribute 'weight_function'
fix the bug 'Linear' object has no attribute 'weight_function'
This commit is contained in:
parent
cc9d669c62
commit
38ed808658
@ -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 not hasattr(m, "weight_function"):
|
||||
if hasattr(m, "weight_function"):
|
||||
m.weight_function = []
|
||||
|
||||
if hasattr(m, "bias_function"):
|
||||
@ -781,6 +781,8 @@ class ModelPatcher:
|
||||
if move_weight:
|
||||
cast_weight = self.force_cast_weights
|
||||
m.to(device_to)
|
||||
if not hasattr(m, "weight_function"):
|
||||
m.weight_function=[]
|
||||
module_mem += move_weight_functions(m, device_to)
|
||||
if lowvram_possible:
|
||||
if weight_key in self.patches:
|
||||
|
Loading…
Reference in New Issue
Block a user