Fix potential issue. (#11201)

This commit is contained in:
comfyanonymous 2025-12-08 20:20:04 -08:00 committed by GitHub
parent 3b0368aa34
commit d50f342c90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -923,7 +923,7 @@ class ModelPatcher:
patch_counter += 1
cast_weight = True
if cast_weight:
if cast_weight and hasattr(m, "comfy_cast_weights"):
m.prev_comfy_cast_weights = m.comfy_cast_weights
m.comfy_cast_weights = True
m.comfy_patched_weights = False