Update convert.py
Browse files- convert.py +1 -1
convert.py
CHANGED
@@ -95,7 +95,7 @@ def convert_file(
|
|
95 |
pt_filename: str,
|
96 |
sf_filename: str,
|
97 |
):
|
98 |
-
loaded = torch.load(pt_filename)
|
99 |
if "state_dict" in loaded:
|
100 |
loaded = loaded["state_dict"]
|
101 |
shared = shared_pointers(loaded)
|
|
|
95 |
pt_filename: str,
|
96 |
sf_filename: str,
|
97 |
):
|
98 |
+
loaded = torch.load(pt_filename, map_location="cpu")
|
99 |
if "state_dict" in loaded:
|
100 |
loaded = loaded["state_dict"]
|
101 |
shared = shared_pointers(loaded)
|