Open yyh565655555 opened 11 months ago
add a `local_dir` parameter for Vocos class may work:
@classmethod
def from_pretrained(cls, local_dir: str, repo_id: str = None, revision: Optional[str] = None) -> Vocos:
"""
Class method to create a new Vocos model instance from a pre-trained model stored in the Hugging Face model hub.
"""
if local_dir:
config_path = os.path.join(local_dir, "config.yaml")
model_path = os.path.join(local_dir, "pytorch_model.bin")
elif repo_id:
config_path = hf_hub_download(repo_id=repo_id, filename="config.yaml", revision=revision)
model_path = hf_hub_download(repo_id=repo_id, filename="pytorch_model.bin", revision=revision)
i follow the remead install the vocos, but when testing samples, there is a problem: LocalEntryNotFoundError: An error happened while trying to locate the file on the Hub and we cannot find the requested files in the local cache. Please check your connection and try again or make sure your Internet connection is on. i also download the the pytorch file, but vocos.from_pretrain() how to load the local files?