bshall / knn-vc

Voice Conversion With Just Nearest Neighbors
https://bshall.github.io/knn-vc/
Other
431 stars 64 forks source link

An error when loading models #6

Closed chienlinhuang1116 closed 1 year ago

chienlinhuang1116 commented 1 year ago

I try: import torch, torchaudio knn_vc = torch.hub.load('/home/knn-vc', 'knn_vc', prematched=True, trust_repo=True, pretrained=True)

There is an error when loading models: Traceback (most recent call last): File "/home/knn-vc/inf.py", line 3, in knn_vc = torch.hub.load('knn-vc', 'knn_vc', prematched=True, trust_repo=True, pretrained=True) File "/home/miniconda3/envs/knvc/lib/python3.10/site-packages/torch/hub.py", line 555, in load repo_or_dir = _get_cache_or_reload(repo_or_dir, force_reload, trust_repo, "load", File "/home/miniconda3/envs/knvc/lib/python3.10/site-packages/torch/hub.py", line 199, in _get_cache_or_reload repo_owner, repo_name, ref = _parse_repo_info(github) File "/home/miniconda3/envs/knvc/lib/python3.10/site-packages/torch/hub.py", line 135, in _parse_repo_info repo_owner, repo_name = repo_info.split('/') ValueError: not enough values to unpack (expected 2, got 1)

RF5 commented 1 year ago

Hi, it appears you have a syntax error in your command. It looks like the code you entered is:

import torch, torchaudio
knn_vc = torch.hub.load('/home/knn-vc', 'knn_vc', prematched=True, trust_repo=True, pretrained=True)

But, as in the readme, the correct command is:

import torch, torchaudio
knn_vc = torch.hub.load('bshall/knn-vc', 'knn_vc', prematched=True, trust_repo=True, pretrained=True)

If you try the bottom one it should work :)

RF5 commented 1 year ago

Resolving since this seems to just be a code typo, feel free to reopen if you think there is still an issue.