mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fix attempt to deserialize on CUDA on Mac
Without specifying "cpu", attempts to use non-existent CUDA to deserialize embeddings on macOS, resulting in a warning / failure to load.
This commit is contained in:
parent
1d8f44d356
commit
e509d719ee
@ -225,7 +225,7 @@ class ModelProbe(object):
|
|||||||
with SilenceWarnings():
|
with SilenceWarnings():
|
||||||
if model_path.suffix.endswith((".ckpt", ".pt", ".bin")):
|
if model_path.suffix.endswith((".ckpt", ".pt", ".bin")):
|
||||||
cls._scan_model(model_path, model_path)
|
cls._scan_model(model_path, model_path)
|
||||||
return torch.load(model_path)
|
return torch.load(model_path, map_location="cpu")
|
||||||
else:
|
else:
|
||||||
return safetensors.torch.load_file(model_path)
|
return safetensors.torch.load_file(model_path)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user