1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00

Fix OOMs happening in some cases.

A cloned model patcher sometimes reported a model was loaded on a device
when it wasn't.
This commit is contained in:
comfyanonymous
2024-08-06 13:27:48 -04:00
parent de17a9755e
commit b334605a66
4 changed files with 17 additions and 11 deletions

View File

@@ -274,7 +274,7 @@ class LoadedModel:
return self.model.model_size()
def model_memory_required(self, device):
if device == self.model.current_device:
if device == self.model.current_loaded_device():
return 0
else:
return self.model_memory()