mirror of
https://github.com/FunAudioLLM/CosyVoice.git
synced 2026-02-05 01:49:25 +08:00
mirror modify
This commit is contained in:
@@ -20,11 +20,6 @@ from contextlib import nullcontext
|
||||
import uuid
|
||||
from cosyvoice.utils.common import fade_in_out
|
||||
|
||||
try:
|
||||
import tensorrt as trt
|
||||
except ImportError:
|
||||
...
|
||||
|
||||
class CosyVoiceModel:
|
||||
|
||||
def __init__(self,
|
||||
@@ -72,6 +67,7 @@ class CosyVoiceModel:
|
||||
self.llm.llm = llm_llm
|
||||
|
||||
def load_trt(self, model_dir, use_fp16):
|
||||
import tensorrt as trt
|
||||
trt_file_name = 'estimator_fp16.plan' if use_fp16 else 'estimator_fp32.plan'
|
||||
trt_file_path = os.path.join(model_dir, trt_file_name)
|
||||
if not os.path.isfile(trt_file_path):
|
||||
|
||||
Reference in New Issue
Block a user