From 43f9e9ab20f307521e7904305c6ee50bdc9d5516 Mon Sep 17 00:00:00 2001 From: "lyuxiang.lx" Date: Mon, 13 Jan 2025 10:30:13 +0800 Subject: [PATCH] update --- cosyvoice/utils/file_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cosyvoice/utils/file_utils.py b/cosyvoice/utils/file_utils.py index d80f92d..ac7fe93 100644 --- a/cosyvoice/utils/file_utils.py +++ b/cosyvoice/utils/file_utils.py @@ -14,7 +14,6 @@ # limitations under the License. import json -import tensorrt as trt import torchaudio import logging logging.getLogger('matplotlib').setLevel(logging.WARNING) @@ -49,6 +48,7 @@ def load_wav(wav, target_sr): def convert_onnx_to_trt(trt_model, onnx_model, fp16): + import tensorrt as trt _min_shape = [(2, 80, 4), (2, 1, 4), (2, 80, 4), (2,), (2, 80), (2, 80, 4)] _opt_shape = [(2, 80, 193), (2, 1, 193), (2, 80, 193), (2,), (2, 80), (2, 80, 193)] _max_shape = [(2, 80, 6800), (2, 1, 6800), (2, 80, 6800), (2,), (2, 80), (2, 80, 6800)]