Fix AttributeError in ModelPatcher.__del__ by adding safety check for 'pinned'

This commit is contained in:
V0pr0S 2025-12-25 21:59:14 +03:00
parent a64fe846af
commit f1f4f545f4

View File

@ -1361,7 +1361,7 @@ class ModelPatcher:
try:
if hasattr(self, 'pinned'):
self.unpin_all_weights()
# Existing code...
self.detach(unpatch_all=False)
except Exception as e:
# Suppress errors in destructor to avoid noise
pass