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

about the install problems #32

Open
yyh565655555 opened this issue Oct 27, 2023 · 1 comment
Open

about the install problems #32

yyh565655555 opened this issue Oct 27, 2023 · 1 comment

Comments

@yyh565655555
Copy link

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?

@hualizhou167
Copy link

hualizhou167 commented Mar 28, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants