diff --git a/.gitignore b/.gitignore index 4d11cbf..d50aeab 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ bark_weights/ build/ +models/ diff --git a/README.md b/README.md index 2ff2448..9398d55 100644 --- a/README.md +++ b/README.md @@ -113,10 +113,14 @@ wget https://huggingface.co/suno/bark/raw/main/vocab.txt mv ./vocab.txt ./models/ # convert the model to ggml format -python3 convert.py --dir-model ./models --out-dir ./ggml_weights/ --vocab-path ./models +python3 convert.py --dir-model ./models --out-dir ./ggml_weights/ --vocab-path ./models --use-f16 + +# convert the codec to ggml format +python3 encodec.cpp/convert.py --dir-model ./models/ --out-dir ./ggml_weights/ --use-f16 +mv ggml_weights/ggml-model.bin ggml_weights/encodec_weights.bin # run the inference -./build/examples/main/main -m ./ggml_weights/ -p "this is an audio" +./build/examples/main/main -m ./ggml_weights/ -em ./ggml_weights/encodec_weights.bin -p "this is an audio" ``` ### (Optional) Quantize weights diff --git a/bark.cpp b/bark.cpp index 04ea0a7..43e021f 100644 --- a/bark.cpp +++ b/bark.cpp @@ -737,7 +737,6 @@ static bool bark_model_load(std::ifstream& fin, gpt_model& model, int n_gpu_laye #ifdef GGML_USE_METAL if (n_gpu_layers > 0) { fprintf(stderr, "%s: using Metal backend\n", __func__); - ggml_metal_log_set_callback(ggml_log_callback_default, nullptr); model.backend = ggml_backend_metal_init(); if (!model.backend) { fprintf(stderr, "%s: ggml_backend_metal_init() failed\n", __func__);