mirror of
https://github.com/FunAudioLLM/CosyVoice.git
synced 2026-02-04 17:39:25 +08:00
@@ -87,6 +87,8 @@ class CosyVoiceModel:
|
|||||||
assert torch.cuda.is_available(), 'tensorrt only supports gpu!'
|
assert torch.cuda.is_available(), 'tensorrt only supports gpu!'
|
||||||
if not os.path.exists(flow_decoder_estimator_model):
|
if not os.path.exists(flow_decoder_estimator_model):
|
||||||
convert_onnx_to_trt(flow_decoder_estimator_model, flow_decoder_onnx_model, fp16)
|
convert_onnx_to_trt(flow_decoder_estimator_model, flow_decoder_onnx_model, fp16)
|
||||||
|
if os.path.getsize(flow_decoder_estimator_model) == 0:
|
||||||
|
raise ValueError('{} is empty file, delete it and export again!'.format(flow_decoder_estimator_model))
|
||||||
del self.flow.decoder.estimator
|
del self.flow.decoder.estimator
|
||||||
import tensorrt as trt
|
import tensorrt as trt
|
||||||
with open(flow_decoder_estimator_model, 'rb') as f:
|
with open(flow_decoder_estimator_model, 'rb') as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user