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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user