lvwerra HF staff commited on
Commit
dbffb72
1 Parent(s): ca6ec81

fix multi-file conversion

Browse files

the `pt_filename` containst the full path and thus `st_filename` could not be merged with `folder`

Files changed (1) hide show
  1. convert.py +1 -1
convert.py CHANGED
@@ -82,7 +82,7 @@ def convert_multi(model_id: str, folder: str, token: Optional[str]) -> Conversio
82
  pt_filename = hf_hub_download(repo_id=model_id, filename=filename, token=token)
83
 
84
  sf_filename = rename(pt_filename)
85
- sf_filename = os.path.join(folder, sf_filename)
86
  convert_file(pt_filename, sf_filename)
87
  local_filenames.append(sf_filename)
88
 
 
82
  pt_filename = hf_hub_download(repo_id=model_id, filename=filename, token=token)
83
 
84
  sf_filename = rename(pt_filename)
85
+ sf_filename = os.path.join(folder, os.path.split(sf_filename)[1])
86
  convert_file(pt_filename, sf_filename)
87
  local_filenames.append(sf_filename)
88