fix: use ComfyUI models folder for model downloads instead of HF cache

- Change node.py to use chatterbox_handler's download function
- Models now download to models/tts/chatterbox/ directory
- Remove hf_hub_download from tokenizer, use local file path instead
- Bump version to 1.0.2
This commit is contained in:
james-song
2025-12-28 19:04:09 +09:00
parent b625c94cfd
commit 735e28ed82
3 changed files with 113 additions and 70 deletions
+7 -2
View File
@@ -61,10 +61,15 @@ def get_or_load_model(device=None):
cache_key = f"chatterbox_mtl_{device}"
if cache_key not in _MODEL_CACHE:
from .src.chatterbox.mtl_tts import ChatterboxMultilingualTTS
from .chatterbox_handler import (
load_chatterbox_multilingual_tts_model,
DEFAULT_MTL_MODEL_PACK_NAME,
)
print(f"[Chatterbox] Loading multilingual model on {device}...")
_MODEL_CACHE[cache_key] = ChatterboxMultilingualTTS.from_pretrained(device)
_MODEL_CACHE[cache_key] = load_chatterbox_multilingual_tts_model(
DEFAULT_MTL_MODEL_PACK_NAME, device
)
print("[Chatterbox] Model loaded successfully.")
return _MODEL_CACHE[cache_key]