From 9615d2663a50945d74ef0778cb19af758395ed12 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Mon, 15 Apr 2024 15:41:46 +0300 Subject: [PATCH 1/3] bark : remove metal callback --- bark.cpp | 1 - 1 file changed, 1 deletion(-) 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__); From c568b23c095d7892f26e296221d045384623855c Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Mon, 15 Apr 2024 15:45:41 +0300 Subject: [PATCH 2/3] gitignore : models --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4d11cbf..d50aeab 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ bark_weights/ build/ +models/ From 83266ba5049fdba72708a667f5ca2226cb3cc323 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Mon, 15 Apr 2024 15:45:48 +0300 Subject: [PATCH 3/3] readme : update instructions to convert the codec --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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