mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-11 06:40:48 +08:00
Fix AttributeError in ModelPatcher.__del__ by adding safety check for 'pinned'
This commit is contained in:
parent
a64fe846af
commit
f1f4f545f4
@ -1361,7 +1361,7 @@ class ModelPatcher:
|
|||||||
try:
|
try:
|
||||||
if hasattr(self, 'pinned'):
|
if hasattr(self, 'pinned'):
|
||||||
self.unpin_all_weights()
|
self.unpin_all_weights()
|
||||||
# Existing code...
|
self.detach(unpatch_all=False)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# Suppress errors in destructor to avoid noise
|
# Suppress errors in destructor to avoid noise
|
||||||
pass
|
pass
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user