mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-10-03 00:55:14 -07:00
fix: install chatterbox-tts with --no-deps to avoid numpy pin conflict
chatterbox-tts 0.1.6 pins numpy<1.26 and torch==2.6 which are incompatible with Python 3.12+. Install with --no-deps and list its sub-dependencies explicitly in requirements.txt. Also removes HFProgressTracker from chatterbox backend to avoid 'generator didn't stop after throw()' errors from tqdm patching.
This commit is contained in:
@@ -48,6 +48,7 @@ setup-python: $(VENV)/bin/activate ## Set up Python virtual environment and depe
|
|||||||
@echo -e "$(BLUE)Installing Python dependencies...$(NC)"
|
@echo -e "$(BLUE)Installing Python dependencies...$(NC)"
|
||||||
$(PIP) install --upgrade pip
|
$(PIP) install --upgrade pip
|
||||||
$(PIP) install -r $(BACKEND_DIR)/requirements.txt
|
$(PIP) install -r $(BACKEND_DIR)/requirements.txt
|
||||||
|
$(PIP) install --no-deps chatterbox-tts
|
||||||
@if [ "$$(uname -m)" = "arm64" ] && [ "$$(uname)" = "Darwin" ]; then \
|
@if [ "$$(uname -m)" = "arm64" ] && [ "$$(uname)" = "Darwin" ]; then \
|
||||||
echo -e "$(BLUE)Detected Apple Silicon - installing MLX dependencies...$(NC)"; \
|
echo -e "$(BLUE)Detected Apple Silicon - installing MLX dependencies...$(NC)"; \
|
||||||
$(PIP) install -r $(BACKEND_DIR)/requirements-mlx.txt; \
|
$(PIP) install -r $(BACKEND_DIR)/requirements-mlx.txt; \
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import numpy as np
|
|||||||
from . import TTSBackend
|
from . import TTSBackend
|
||||||
from ..utils.audio import normalize_audio, load_audio
|
from ..utils.audio import normalize_audio, load_audio
|
||||||
from ..utils.progress import get_progress_manager
|
from ..utils.progress import get_progress_manager
|
||||||
from ..utils.hf_progress import HFProgressTracker, create_hf_progress_callback
|
|
||||||
from ..utils.tasks import get_task_manager
|
from ..utils.tasks import get_task_manager
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@@ -110,10 +109,6 @@ class ChatterboxTTSBackend:
|
|||||||
|
|
||||||
is_cached = self._is_model_cached()
|
is_cached = self._is_model_cached()
|
||||||
|
|
||||||
try:
|
|
||||||
progress_callback = create_hf_progress_callback(model_name, progress_manager)
|
|
||||||
tracker = HFProgressTracker(progress_callback, filter_non_downloads=is_cached)
|
|
||||||
|
|
||||||
if not is_cached:
|
if not is_cached:
|
||||||
task_manager.start_download(model_name)
|
task_manager.start_download(model_name)
|
||||||
progress_manager.update_progress(
|
progress_manager.update_progress(
|
||||||
@@ -124,7 +119,7 @@ class ChatterboxTTSBackend:
|
|||||||
status="downloading",
|
status="downloading",
|
||||||
)
|
)
|
||||||
|
|
||||||
with tracker.patch_download():
|
try:
|
||||||
device = self._get_device()
|
device = self._get_device()
|
||||||
self._device = device
|
self._device = device
|
||||||
|
|
||||||
@@ -179,11 +174,13 @@ class ChatterboxTTSBackend:
|
|||||||
"chatterbox-tts package not found. "
|
"chatterbox-tts package not found. "
|
||||||
"Install with: pip install chatterbox-tts"
|
"Install with: pip install chatterbox-tts"
|
||||||
)
|
)
|
||||||
|
if not is_cached:
|
||||||
progress_manager.mark_error(model_name, str(e))
|
progress_manager.mark_error(model_name, str(e))
|
||||||
task_manager.error_download(model_name, str(e))
|
task_manager.error_download(model_name, str(e))
|
||||||
raise
|
raise
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Failed to load Chatterbox: {e}")
|
logger.error(f"Failed to load Chatterbox: {e}")
|
||||||
|
if not is_cached:
|
||||||
progress_manager.mark_error(model_name, str(e))
|
progress_manager.mark_error(model_name, str(e))
|
||||||
task_manager.error_download(model_name, str(e))
|
task_manager.error_download(model_name, str(e))
|
||||||
raise
|
raise
|
||||||
|
|||||||
@@ -21,8 +21,17 @@ qwen-tts>=0.0.5
|
|||||||
linacodec @ git+https://github.com/ysharma3501/LinaCodec.git
|
linacodec @ git+https://github.com/ysharma3501/LinaCodec.git
|
||||||
Zipvoice @ git+https://github.com/ysharma3501/LuxTTS.git
|
Zipvoice @ git+https://github.com/ysharma3501/LuxTTS.git
|
||||||
|
|
||||||
# Chatterbox TTS (multilingual voice cloning, includes Hebrew)
|
# Chatterbox TTS sub-dependencies (chatterbox-tts itself is installed
|
||||||
chatterbox-tts>=0.1.0
|
# --no-deps in the setup script because it pins numpy<1.26 / torch==2.6
|
||||||
|
# which are incompatible with Python 3.12+)
|
||||||
|
conformer>=0.3.2
|
||||||
|
diffusers>=0.29.0
|
||||||
|
omegaconf
|
||||||
|
pykakasi
|
||||||
|
resemble-perth>=1.0.1
|
||||||
|
s3tokenizer
|
||||||
|
spacy-pkuseg
|
||||||
|
pyloudnorm
|
||||||
|
|
||||||
# Audio processing
|
# Audio processing
|
||||||
librosa>=0.10.0
|
librosa>=0.10.0
|
||||||
|
|||||||
@@ -38,6 +38,8 @@ setup-python:
|
|||||||
echo "Installing Python dependencies..."
|
echo "Installing Python dependencies..."
|
||||||
{{ pip }} install --upgrade pip -q
|
{{ pip }} install --upgrade pip -q
|
||||||
{{ pip }} install -r {{ backend_dir }}/requirements.txt
|
{{ pip }} install -r {{ backend_dir }}/requirements.txt
|
||||||
|
# Chatterbox pins numpy<1.26 / torch==2.6 which break on Python 3.12+
|
||||||
|
{{ pip }} install --no-deps chatterbox-tts
|
||||||
# Apple Silicon: install MLX backend
|
# Apple Silicon: install MLX backend
|
||||||
if [ "$(uname -m)" = "arm64" ] && [ "$(uname)" = "Darwin" ]; then
|
if [ "$(uname -m)" = "arm64" ] && [ "$(uname)" = "Darwin" ]; then
|
||||||
echo "Detected Apple Silicon — installing MLX dependencies..."
|
echo "Detected Apple Silicon — installing MLX dependencies..."
|
||||||
|
|||||||
Reference in New Issue
Block a user