Narsil HF staff commited on
Commit
ba06fbc
1 Parent(s): bac319c

Update convert.py

Browse files
Files changed (1) hide show
  1. 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
  shared = shared_pointers(loaded)
100
  for shared_weights in shared:
101
  for name in shared_weights[1:]:
 
95
  pt_filename: str,
96
  sf_filename: str,
97
  ):
98
+ loaded = torch.load(pt_filename, map_location="cpu")
99
  shared = shared_pointers(loaded)
100
  for shared_weights in shared:
101
  for name in shared_weights[1:]: