Files
CosyVoice/cosyvoice/bin/export_trt.py
2024-08-29 10:44:04 +08:00

8 lines
623 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# TODO 跟export_jit一样的逻辑完成flow部分的estimator的onnx导出。
# tensorrt的安装方式再这里写一下步骤提示如下如果没有安装那么不要执行这个脚本提示用户先安装不给选择
try:
import tensorrt
except ImportError:
print('step1, 下载\n step2. 解压安装whl')
# 安装命令里tensosrt的根目录用环境变量导入比如os.environ['tensorrt_root_dir']/bin/exetrace然后python里subprocess里执行导出命令
# 后面我会在run.sh里写好执行命令 tensorrt_root_dir=xxxx python cosyvoice/bin/export_trt.py --model_dir xxx