瀏覽代碼

Merge pull request #1187 from hexisyztem/dev/Comet

Refactor CUDA stream context management in CosyVoice2Model
Xiang Lyu 1 年之前
父節點
當前提交
4c9a4c2fed
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      cosyvoice/cli/model.py

+ 1 - 1
cosyvoice/cli/model.py

@@ -385,7 +385,7 @@ class CosyVoice2Model(CosyVoiceModel):
         # this_uuid is used to track variables related to this inference thread
         self.synchronize_stream()
         stream_context = self.stream_context_pool.get()
-        with torch.cuda.stream(stream_context):
+        with stream_context:
 
             this_uuid = str(uuid.uuid1())
             with self.lock: