Spaces:
Runtime error
Runtime error
gordonhubackup
commited on
Commit
•
b421fa4
1
Parent(s):
e62d81d
gpu
Browse files
bliva/models/base_model.py
CHANGED
@@ -37,9 +37,9 @@ class BaseModel(nn.Module):
|
|
37 |
cached_file = download_cached_file(
|
38 |
url_or_filename, check_hash=False, progress=True
|
39 |
)
|
40 |
-
checkpoint = torch.load(cached_file, map_location="
|
41 |
elif os.path.isfile(url_or_filename):
|
42 |
-
checkpoint = torch.load(url_or_filename, map_location="
|
43 |
else:
|
44 |
raise RuntimeError("checkpoint url or path is invalid")
|
45 |
|
|
|
37 |
cached_file = download_cached_file(
|
38 |
url_or_filename, check_hash=False, progress=True
|
39 |
)
|
40 |
+
checkpoint = torch.load(cached_file, map_location="cpu")
|
41 |
elif os.path.isfile(url_or_filename):
|
42 |
+
checkpoint = torch.load(url_or_filename, map_location="cpu")
|
43 |
else:
|
44 |
raise RuntimeError("checkpoint url or path is invalid")
|
45 |
|