From fd0b73e699aa117c76d97563941a6f6f8a1d64b2 Mon Sep 17 00:00:00 2001 From: Hao Guan <10684225+hguandl@users.noreply.github.com> Date: Fri, 13 Dec 2024 09:40:23 +0800 Subject: [PATCH] fix: cache reference by hash (#730) (#741) --- tools/inference_engine/reference_loader.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/inference_engine/reference_loader.py b/tools/inference_engine/reference_loader.py index 6369f1db..6f19c6dd 100644 --- a/tools/inference_engine/reference_loader.py +++ b/tools/inference_engine/reference_loader.py @@ -94,9 +94,7 @@ def load_by_hash( else: # Reuse already encoded references - prompt_text, prompt_token = self.ref_by_hash[audio_hashes[i]] - prompt_texts.append(prompt_text) - prompt_tokens.append(prompt_token) + prompt_tokens, prompt_texts = self.ref_by_hash[audio_hashes[i]] cache_used = True if cache_used: