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

Demucs weights #22

Closed
gitbearflying opened this issue Jun 4, 2024 · 5 comments
Closed

Demucs weights #22

gitbearflying opened this issue Jun 4, 2024 · 5 comments

Comments

@gitbearflying
Copy link
Contributor

gitbearflying commented Jun 4, 2024

Hi,

I've successfully compiled demucs.cpp but have problems setting up the python environment.
Is there another way(link?) to download the demucs weights/models, to then convert these to ggml?

Thanks!

@gitbearflying
Copy link
Contributor Author

gitbearflying commented Jun 4, 2024

@sevagh
Copy link
Owner

sevagh commented Jun 8, 2024

Nice - did these instructions not work? https://github.com/sevagh/demucs.cpp?tab=readme-ov-file#convert-weights

I suppose they are Linux-centric (where ~/.cache/torch/hub/checkpoints is where Torch automatically downloads the weights files). That step should run when the model is initialized like so:
https://github.com/sevagh/demucs.cpp/blob/main/scripts/convert-pth-to-ggml.py#L49-L70

When demucs.pretrained.get_model is called, it should automatically download those files to Path(torch.hub.get_dir()) / "checkpoints".

@gitbearflying
Copy link
Contributor Author

Yes, after all the instructions did work. I had to remove "-e ./vendor/demucs" from requirements.txt and manually install torch and demucs. I have an old slow machine and slow internet connections, various timeouts while downloading the whole python-env etc..
Indeed then the weight downloads and conversion did work flawlessly, i put the links here just for reference as i asked for them myself. Maybe these are useful(at least to me) if another conversion to something else is needed.

@sevagh
Copy link
Owner

sevagh commented Jun 8, 2024

Your huggingface model files might be useful to others, in case you want to add them to the README of this repo I'd be happy to accept a PR.

@gitbearflying
Copy link
Contributor Author

Your huggingface model files might be useful to others, in case you want to add them to the README of this repo I'd be happy to accept a PR.

Done :-)

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