Merge branch 'main' into refactor/model-manager-3

This commit is contained in:
Lincoln Stein
2023-11-27 22:15:51 -05:00
committed by GitHub
8 changed files with 142 additions and 163 deletions

View File

@ -238,7 +238,7 @@ class ModelProbe(object):
with SilenceWarnings():
if model_path.suffix.endswith((".ckpt", ".pt", ".bin")):
cls._scan_model(model_path, model_path)
return torch.load(model_path)
return torch.load(model_path, map_location="cpu")
else:
return safetensors.torch.load_file(model_path)