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

Some broken things for first timers #71

Closed
jmtatsch opened this issue Aug 13, 2023 · 2 comments · Fixed by #72
Closed

Some broken things for first timers #71

jmtatsch opened this issue Aug 13, 2023 · 2 comments · Fixed by #72

Comments

@jmtatsch
Copy link
Contributor

First of all, thanks for taking up the challenge and democratising this wunderful model.

encodec_24khz-d7cc33bc.th doesn't download for me

Downloading: "https:/dl.fbaipublicfiles.com/encodec/v0/encodec_24khz-d7cc33bc.th" to /Users/tatsch/.cache/torch/hub/checkpoints/encodec_24khz-d7cc33bc.th
Traceback (most recent call last):
  File "/Users/tatsch/workspace/bark.cpp/download_weights.py", line 41, in <module>
    state_dict = torch.hub.load_state_dict_from_url(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/torch/hub.py", line 746, in load_state_dict_from_url
    download_url_to_file(url, cached_file, hash_prefix, progress=progress)
  File "/opt/homebrew/lib/python3.11/site-packages/torch/hub.py", line 611, in download_url_to_file
    u = urlopen(req)
        ^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 516, in open
    req = meth(req)
          ^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 1272, in do_request_
    raise URLError('no host given')
urllib.error.URLError: <urlopen error no host given>

curl -o models/encodec_24khz-d7cc33bc.th https://dl.fbaipublicfiles.com/encodec/v0/encodec_24khz-d7cc33bc.th

vocab.txt also isnt there for me in models, maybe related to the aforementioned issue

curl -o models/vocab.txt https://huggingface.co/suno/bark/blob/main/vocab.txt

but I guess its the wrong one because when I run it

bark_model_load: reading bark vocab
bark_vocab_load: wrong voculary size (305 != 119547)
bark_model_load: invalid model file './ggml_weights//ggml_vocab.bin' (bad text)
main: failed to load model from './ggml_weights/'

also the call in the readme should be

./main -m ./ggml_weights/ -p "this is an audio"
instead of

./main -m ./models/ggml_weights/ -p "this is an audio"
for the default folder structure.

@Green-Sky
Copy link
Collaborator

Green-Sky commented Aug 13, 2023

curl -o models/vocab.txt https://huggingface.co/suno/bark/blob/main/vocab.txt

if you look into the file, you will see that you downloaded a html site :)

use https://huggingface.co/suno/bark/raw/main/vocab.txt instead

@jmtatsch
Copy link
Contributor Author

Thanks, I have noticed that as well after playing around for a while. I works now, thank you.

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

Successfully merging a pull request may close this issue.

2 participants