summaryrefslogtreecommitdiff
path: root/makima/sh/download-models.sh
diff options
context:
space:
mode:
Diffstat (limited to 'makima/sh/download-models.sh')
-rwxr-xr-xmakima/sh/download-models.sh24
1 files changed, 21 insertions, 3 deletions
diff --git a/makima/sh/download-models.sh b/makima/sh/download-models.sh
index b44e091..4f1bd77 100755
--- a/makima/sh/download-models.sh
+++ b/makima/sh/download-models.sh
@@ -131,9 +131,27 @@ download_chatterbox_tts() {
echo "Downloading Chatterbox TTS models..."
mkdir -p "$CHATTERBOX_MODEL_DIR"
- # Download from ResembleAI/chatterbox-turbo-ONNX
- echo "Downloading ResembleAI/chatterbox-turbo-ONNX..."
- hf download ResembleAI/chatterbox-turbo-ONNX --local-dir "$CHATTERBOX_MODEL_DIR"
+ # Download only the required files from ResembleAI/chatterbox-turbo-ONNX
+ # (skip fp16, q4, q4f16, quantized variants to save ~4GB)
+ echo "Downloading ResembleAI/chatterbox-turbo-ONNX (standard precision only)..."
+ local tmpdir=$(mktemp -d)
+ hf download ResembleAI/chatterbox-turbo-ONNX \
+ --include "onnx/speech_encoder.onnx" \
+ --include "onnx/speech_encoder.onnx_data" \
+ --include "onnx/embed_tokens.onnx" \
+ --include "onnx/embed_tokens.onnx_data" \
+ --include "onnx/language_model.onnx" \
+ --include "onnx/language_model.onnx_data" \
+ --include "onnx/conditional_decoder.onnx" \
+ --include "onnx/conditional_decoder.onnx_data" \
+ --include "tokenizer.json" \
+ --local-dir "$tmpdir"
+
+ # Move files to the model directory (flatten the onnx/ subdirectory)
+ mv "$tmpdir"/onnx/*.onnx "$CHATTERBOX_MODEL_DIR"/
+ mv "$tmpdir"/onnx/*.onnx_data "$CHATTERBOX_MODEL_DIR"/
+ mv "$tmpdir"/tokenizer.json "$CHATTERBOX_MODEL_DIR"/
+ rm -rf "$tmpdir"
echo "Chatterbox TTS models downloaded successfully"
}