encodec.cpp icon indicating copy to clipboard operation
encodec.cpp copied to clipboard

I can't find ggml_weights. I build ggml, but none of those libs were comparable with Encodec.

Open monircsueb opened this issue 1 year ago • 5 comments

Sir, I am trying to compress audio with the examples provided in the short video. I don't find the ggml_model.bin. I would appreciate if you could guide me to correct direction. Thank you

monircsueb avatar Apr 02 '24 20:04 monircsueb

Hi monircsueb. You can use the convert script to create the ggml

d503i330 avatar Apr 15 '24 20:04 d503i330

Hello @monircsueb !

The instructions have been updated. Could you try again?

PABannier avatar Apr 16 '24 20:04 PABannier

@PABannier I still don't see the script to download weights.

romitjain avatar May 29 '24 12:05 romitjain

Okay, in case someone is not able to find it, you'll have to manually download encoded weights from torch hub:

import torch
url = 'https://dl.fbaipublicfiles.com/encodec/v0/encodec_24khz-d7cc33bc.th'
state = torch.hub.load_state_dict_from_url(url, map_location='cpu', check_hash=True)

Once this is done, you can use the convert script provided to convert the weights to ggml

python convert.py \
        --dir-model ~/.cache/torch/hub/checkpoints/ \
        --out-dir ./ggml_weights/ \
        --use-f16

romitjain avatar May 30 '24 07:05 romitjain

Thanks for your message, I'll update the instructions in the README file and add a download_weights.py script.

PABannier avatar Jun 02 '24 19:06 PABannier