Skip to content

Commit 3914b54

Browse files
authored
Merge pull request #603 from oongrider/f_free_cache_dict
release flow_cache_dict to prevent potential memory leaks in long-running processes
2 parents dfcd6d0 + 3411e1f commit 3914b54

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cosyvoice/cli/model.py

+1
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ def tts(self, text, flow_embedding, llm_embedding=torch.zeros(0, 192),
201201
self.llm_end_dict.pop(this_uuid)
202202
self.mel_overlap_dict.pop(this_uuid)
203203
self.hift_cache_dict.pop(this_uuid)
204+
self.flow_cache_dict.pop(this_uuid)
204205

205206
def vc(self, source_speech_token, flow_prompt_speech_token, prompt_speech_feat, flow_embedding, stream=False, speed=1.0, **kwargs):
206207
# this_uuid is used to track variables related to this inference thread

0 commit comments

Comments
 (0)