Skip to content

最新的代码报错 AssertionError: get_trt_kwargs is set for flow cache mode. If you want to use trt with use_flow_cache=False, please set higher max_shape #1191

Closed
@hjj-lmx

Description

@hjj-lmx

Traceback (most recent call last):
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "E:\Project\UD-AI-TextToSpeech\text_to_speech\server_gpu.py", line 36, in
clone_model = CosyVoice2(os.path.join("checkpoints", "CosyVoice2-0.5B"), True, True, True, False)
File "E:\Project\UD-AI-TextToSpeech\text_to_speech\cosyvoice\cli\cosyvoice.py", line 161, in init
self.model.load_trt('{}/flow.decoder.estimator.{}.mygpu.plan'.format(model_dir, 'fp16' if self.fp16 is True else 'fp32'),
File "E:\Project\UD-AI-TextToSpeech\text_to_speech\cosyvoice\cli\model.py", line 86, in load_trt
convert_onnx_to_trt(flow_decoder_estimator_model, self.get_trt_kwargs(), flow_decoder_onnx_model, fp16)
File "E:\Project\UD-AI-TextToSpeech\text_to_speech\cosyvoice\cli\model.py", line 358, in get_trt_kwargs
assert self.use_flow_cache is True, "get_trt_kwargs is set for flow cache mode. If you want to use trt with use_flow_cache=False, please set higher max_shape"
AssertionError: get_trt_kwargs is set for flow cache mode. If you want to use trt with use_flow_cache=False, please set higher max_shape

这是什么原因,缺什么东西吗

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions