mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-10-03 17:15:19 -07:00
fix(offline-guard): make every cache check cover the files the forced-offline load reads
The load body now runs with HF_HUB_OFFLINE forced when _is_model_cached() reports True, so a snapshot that holds the weights but not the small files the loader also opens would fail hard instead of fetching them. Verified against chatterbox-tts 0.1.7 (mtl_tts.py allow_patterns, tts_turbo.py from_local) and the TADA loader's unsloth/Llama-3.2-1B tokenizer download; list those files in the required_files checks. Also note in the changelog why the 0.4.5 removal of this guard no longer applies.
This commit is contained in:
@@ -29,11 +29,18 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
CHATTERBOX_TURBO_HF_REPO = "ResembleAI/chatterbox-turbo"
|
||||
|
||||
# Files that must be present for the turbo model
|
||||
# Every file ChatterboxTurboTTS.from_local() reads (chatterbox-tts 0.1.7): the
|
||||
# three weight files, the GPT-2 tokenizer files AutoTokenizer needs, and the
|
||||
# built-in voice. The load runs with HF offline mode forced when this reports
|
||||
# cached, so a partial snapshot must not count as cached.
|
||||
_TURBO_WEIGHT_FILES = [
|
||||
"t3_turbo_v1.safetensors",
|
||||
"s3gen_meanflow.safetensors",
|
||||
"ve.safetensors",
|
||||
"tokenizer_config.json",
|
||||
"vocab.json",
|
||||
"merges.txt",
|
||||
"conds.pt",
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user