HunyuanDiT icon indicating copy to clipboard operation
HunyuanDiT copied to clipboard

构建tensorrt engine报错

Open xinguo2 opened this issue 1 year ago • 1 comments

我按照教程https://huggingface.co/Tencent-Hunyuan/TensorRT-libs/blob/main/README.md自行构建tensorrt engine,安装按依赖后import tensorrt可以成功导入,在进行sh trt/build_engine.sh构建engine时报错,无法导出成功: [07/18/2024-07:49:33] [E] Cannot find input tensor with name "encoder_hidden_states" in the network inputs! Please make sure the input tensor names are correct. [07/18/2024-07:49:33] [E] Network And Config setup failed [07/18/2024-07:49:33] [E] Building engine failed [07/18/2024-07:49:33] [E] Failed to create engine from model or file. [07/18/2024-07:49:33] [E] Engine set up failed 微信图片_20240718161626

之后在进行推理时,报No module named 'cuda'错误: 222 有什么解决方案吗,谢谢~

xinguo2 avatar Jul 18 '24 08:07 xinguo2

I met the similar issue, and I check the onnx_file, I found that some input nodes are missing which is confusing! image image

ZiangWu-77 avatar Aug 27 '24 03:08 ZiangWu-77