Skip to content

Commit

Permalink
adding library name
Browse files Browse the repository at this point in the history
  • Loading branch information
adefossez committed Nov 6, 2023
1 parent 8dc2c95 commit f0b0e80
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion audiocraft/models/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from omegaconf import OmegaConf, DictConfig
import torch

import audiocraft
from . import builders
from .encodec import CompressionModel

Expand Down Expand Up @@ -60,7 +61,9 @@ def _get_state_dict(
else:
assert filename is not None, "filename needs to be defined if using HF checkpoints"

file = hf_hub_download(repo_id=file_or_url_or_id, filename=filename, cache_dir=cache_dir)
file = hf_hub_download(
repo_id=file_or_url_or_id, filename=filename, cache_dir=cache_dir,
library_name="audiocraft", library_version=audiocraft.__version__)
return torch.load(file, map_location=device)


Expand Down

0 comments on commit f0b0e80

Please sign in to comment.