Skip to content

Commit e7513f6

Browse files
docs(mm): add comment in move_model_to_device
1 parent c7f22b6 commit e7513f6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

invokeai/backend/model_manager/load/model_cache/model_cache_default.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ def move_model_to_device(self, cache_entry: CacheRecord[AnyModel], target_device
261261
if torch.device(source_device).type == torch.device(target_device).type:
262262
return
263263

264+
# Some models don't have a `to` method, in which case they run in RAM/CPU.
264265
if not hasattr(cache_entry.model, "to"):
265266
return
266267

0 commit comments

Comments
 (0)