Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix model conversion #76

Merged
merged 2 commits into from
Aug 16, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix download link
  • Loading branch information
vietanhdev committed Aug 16, 2023
commit e97b7c4a96f44f3a5fe6f7751bc52f8c67ec14aa
6 changes: 3 additions & 3 deletions download_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import torch


ENCODEC_PATH = Path("https://dl.fbaipublicfiles.com/encodec/v0/encodec_24khz-d7cc33bc.th")
ENCODEC_PATH = "https://dl.fbaipublicfiles.com/encodec/v0/encodec_24khz-d7cc33bc.th"

REMOTE_MODEL_PATHS = {
"text": {
Expand Down Expand Up @@ -39,11 +39,11 @@

print(" ### Downloading EnCodec weights...")
state_dict = torch.hub.load_state_dict_from_url(
str(ENCODEC_PATH),
ENCODEC_PATH,
map_location="cpu",
check_hash=True
)
with open(out_dir / ENCODEC_PATH.name, "wb") as fout:
with open(out_dir / Path(ENCODEC_PATH).name, "wb") as fout:
torch.save(state_dict, fout)

print("Done.")