From e7513f60887b358055e23631024e701d3ffca20d Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Mon, 3 Jun 2024 10:56:04 +1000 Subject: [PATCH] docs(mm): add comment in `move_model_to_device` --- .../model_manager/load/model_cache/model_cache_default.py | 1 + 1 file changed, 1 insertion(+) diff --git a/invokeai/backend/model_manager/load/model_cache/model_cache_default.py b/invokeai/backend/model_manager/load/model_cache/model_cache_default.py index 10c0210052..335a15a5c8 100644 --- a/invokeai/backend/model_manager/load/model_cache/model_cache_default.py +++ b/invokeai/backend/model_manager/load/model_cache/model_cache_default.py @@ -261,6 +261,7 @@ class ModelCache(ModelCacheBase[AnyModel]): if torch.device(source_device).type == torch.device(target_device).type: return + # Some models don't have a `to` method, in which case they run in RAM/CPU. if not hasattr(cache_entry.model, "to"): return