Spaces:
Running
Running
Update convert.py
Browse files- convert.py +1 -1
convert.py
CHANGED
@@ -183,7 +183,7 @@ def convert_file(
|
|
183 |
sf_filename: str,
|
184 |
discard_names: List[str],
|
185 |
):
|
186 |
-
loaded = torch.load(pt_filename, map_location="cpu")
|
187 |
if "state_dict" in loaded:
|
188 |
loaded = loaded["state_dict"]
|
189 |
to_removes = _remove_duplicate_names(loaded, discard_names=discard_names)
|
|
|
183 |
sf_filename: str,
|
184 |
discard_names: List[str],
|
185 |
):
|
186 |
+
loaded = torch.load(pt_filename, map_location="cpu", weights_only=True)
|
187 |
if "state_dict" in loaded:
|
188 |
loaded = loaded["state_dict"]
|
189 |
to_removes = _remove_duplicate_names(loaded, discard_names=discard_names)
|