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:
jamiepine
2026-10-03 09:35:49 +00:00
parent 32ba50cdd2
commit 865c324ff6
4 changed files with 36 additions and 5 deletions
+6 -1
View File
@@ -29,11 +29,16 @@ logger = logging.getLogger(__name__)
CHATTERBOX_HF_REPO = "ResembleAI/chatterbox"
# Files that must be present for the multilingual model
# Every file ChatterboxMultilingualTTS.from_pretrained() downloads (chatterbox-tts
# 0.1.7, mtl_tts.py allow_patterns). The load runs with HF offline mode forced
# when this reports cached, so a partial snapshot must not count as cached.
_MTL_WEIGHT_FILES = [
"t3_mtl23ls_v2.safetensors",
"s3gen.pt",
"ve.pt",
"grapheme_mtl_merged_expanded_v1.json",
"conds.pt",
"Cangjie5_TC.json",
]