From 3411e1f599da2e06aa72e045a3f307bb11f711e2 Mon Sep 17 00:00:00 2001 From: boostarea Date: Mon, 28 Oct 2024 12:02:07 +0800 Subject: [PATCH] feat.release flow_cache_dict to prevent potential memory leaks in long-running processes. --- cosyvoice/cli/model.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cosyvoice/cli/model.py b/cosyvoice/cli/model.py index 024fa7f..de86a24 100644 --- a/cosyvoice/cli/model.py +++ b/cosyvoice/cli/model.py @@ -201,6 +201,7 @@ class CosyVoiceModel: self.llm_end_dict.pop(this_uuid) self.mel_overlap_dict.pop(this_uuid) self.hift_cache_dict.pop(this_uuid) + self.flow_cache_dict.pop(this_uuid) def vc(self, source_speech_token, flow_prompt_speech_token, prompt_speech_feat, flow_embedding, stream=False, speed=1.0, **kwargs): # this_uuid is used to track variables related to this inference thread