Call unpatch_hooks at the start of ModelPatcher.partially_unload

This commit is contained in:
Jedrzej Kosinski 2025-03-15 07:37:26 -05:00
parent 55a1b09ddc
commit e03bd9e0e3

View File

@ -747,6 +747,7 @@ class ModelPatcher:
def partially_unload(self, device_to, memory_to_free=0):
with self.use_ejected():
self.unpatch_hooks()
memory_freed = 0
patch_counter = 0
unload_list = self._load_list()