mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-09 13:47:10 +08: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
|
m.comfy_cast_weights = m.prev_comfy_cast_weights
|
||||||
del 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 = []
|
m.weight_function = []
|
||||||
|
|
||||||
if hasattr(m, "bias_function"):
|
if hasattr(m, "bias_function"):
|
||||||
@ -781,6 +781,8 @@ class ModelPatcher:
|
|||||||
if move_weight:
|
if move_weight:
|
||||||
cast_weight = self.force_cast_weights
|
cast_weight = self.force_cast_weights
|
||||||
m.to(device_to)
|
m.to(device_to)
|
||||||
|
if not hasattr(m, "weight_function"):
|
||||||
|
m.weight_function=[]
|
||||||
module_mem += move_weight_functions(m, device_to)
|
module_mem += move_weight_functions(m, device_to)
|
||||||
if lowvram_possible:
|
if lowvram_possible:
|
||||||
if weight_key in self.patches:
|
if weight_key in self.patches:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user