Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Fix case of weights not being unpinned. (#10533)

comfyanonymousec4fc2a09a39
diff --git a/comfy/model_patcher.py b/comfy/model_patcher.py
index aec73349c..119119e96 100644
--- a/comfy/model_patcher.py
+++ b/comfy/model_patcher.py
@@ -1283,5 +1283,6 @@ class ModelPatcher:
self.clear_cached_hook_weights()
def __del__(self):
+ self.unpin_all_weights()
self.detach(unpatch_all=False)