Revert "fix triton token2wav model cache thread unsafety"

This reverts commit cd26dd1932.
This commit is contained in:
김의진
2025-10-27 18:07:30 +09:00
parent cd26dd1932
commit fa2781405f

View File

@@ -28,7 +28,6 @@ import json
import os
import logging
from uuid import uuid4
import torch
from torch.utils.dlpack import to_dlpack
@@ -236,17 +235,17 @@ class TritonPythonModel:
stream = True
else:
stream = False
uuid = uuid4().hex
request_id = request.request_id()
audio_hat = self.token2wav_model.model.token2wav(token=target_speech_tokens,
prompt_token=prompt_speech_tokens,
prompt_feat=prompt_speech_feat,
embedding=prompt_spk_embedding,
token_offset=token_offset,
uuid=uuid,
uuid=request_id,
stream=stream,
finalize=finalize)
if finalize:
self.token2wav_model.model.hift_cache_dict.pop(uuid)
self.token2wav_model.model.hift_cache_dict.pop(request_id)
else:
tts_mel, _ = self.token2wav_model.model.flow.inference(