[Bugfix] Invalidate stale ref_audio cache on local file modification (#4873) (#5670)

Signed-off-by: pranavthakur0-0 <pranavthakurdew@gmail.com>
Co-authored-by: Zhou Taichang <tzhouam@connect.ust.hk>
This commit is contained in:
Pranav ThakurandZhou Taichang authored and GitHub committed 2026-08-25 10:06:32 +08:00
1 parent 50b8a150f9
commit 53b60bd9bc
10 files changed
+675 -103

No files matched your search

@@ -183,6 +183,13 @@ def test_indextts25_speed_does_not_change_conditioning_cache_salt():
) == indextts2_conditioning_cache_salt(slow_request, slow_params)
def test_indextts2_conditioning_cache_salt_changes_with_ref_audio_cache_key():
request = SimpleNamespace(input="hello", ref_audio="file:///data/spk.wav")
salt_a = indextts2_conditioning_cache_salt(request, {"ref_audio_cache_key": ["key_aaa"]})
salt_b = indextts2_conditioning_cache_salt(request, {"ref_audio_cache_key": ["key_bbb"]})
assert salt_a != salt_b
@pytest.mark.parametrize(
("hf_config", "expected_tokenizer_file"),
[