Skip to content

Commit d50f342

Browse files
Fix potential issue. (#11201)
1 parent 3b0368a commit d50f342

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

comfy/model_patcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ def partially_unload(self, device_to, memory_to_free=0, force_patch_weights=Fals
923923
patch_counter += 1
924924
cast_weight = True
925925

926-
if cast_weight:
926+
if cast_weight and hasattr(m, "comfy_cast_weights"):
927927
m.prev_comfy_cast_weights = m.comfy_cast_weights
928928
m.comfy_cast_weights = True
929929
m.comfy_patched_weights = False

0 commit comments

Comments
 (0)