From 8361916ce67f3d2ba191ebf27cb50e79cb42e39c Mon Sep 17 00:00:00 2001 From: soryu Date: Mon, 2 Feb 2026 23:16:00 +0000 Subject: Fix downloading too many models --- makima/sh/download-models.sh | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'makima') 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" } -- cgit v1.2.3