Update probe to always use cpu for loading models

This commit is contained in:
brandonrising 2024-04-03 15:13:25 -04:00 committed by psychedelicious
parent 216b34ac44
commit 51ca59c088

View File

@ -324,7 +324,7 @@ class ModelProbe(object):
with SilenceWarnings():
if model_path.suffix.endswith((".ckpt", ".pt", ".pth", ".bin")):
cls._scan_model(model_path.name, model_path)
model = torch.load(model_path)
model = torch.load(model_path, map_location="cpu")
assert isinstance(model, dict)
return model
else: