Update probe to always use cpu for loading models

This commit is contained in:
brandonrising 2024-04-03 15:13:25 -04:00
parent 59b4a23479
commit 0b238b1ece

View File

@ -323,7 +323,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: