mit-han-lab / efficientvit

EfficientViT is a new family of vision models for efficient high-resolution vision.
Apache License 2.0
1.59k stars 141 forks source link

TensorRT Export error #73

Closed ghm666 closed 3 months ago

ghm666 commented 4 months ago
# Export Encoder
trtexec --onnx=assets/export_models/sam/onnx/xl1_encoder.onnx --minShapes=input_image:1x3x1024x1024 --optShapes=input_image:4x3x1024x1024 --maxShapes=input_image:4x3x1024x1024 --saveEngine=assets/export_models/sam/tensorrt/xl1_encoder.engine

Error message:

[02/29/2024-10:13:33] [E] [TRT] ModelImporter.cpp:751: --- End node --- [02/29/2024-10:13:33] [E] [TRT] ModelImporter.cpp:754: ERROR: ModelImporter.cpp:179 In function parseGraph: [6] Invalid Node - /image_encoder/backbone/stages.4/op_list.1/context_module/main/Pad [shuffleNode.cpp::symbolicExecute::391] Error Code 4: Internal Error (/image_encoder/backbone/stages.4/op_list.1/context_module/main/Reshape_1: IShuffleLayer applied to shape tensor must have 0 or 1 reshape dimensions: dimensions were [-1,2]) [02/29/2024-10:13:33] [E] Failed to parse onnx file [02/29/2024-10:13:33] [I] Finish parsing network model [02/29/2024-10:13:33] [E] Parsing model failed [02/29/2024-10:13:33] [E] Failed to create engine from model. [02/29/2024-10:13:33] [E] Engine set up failed

# Export Decoder
trtexec --onnx=assets/export_models/sam/onnx/xl1_decoder.onnx --minShapes=point_coords:1x1x2,point_labels:1x1 --optShapes=point_coords:16x2x2,point_labels:16x2 --maxShapes=point_coords:16x2x2,point_labels:16x2 --fp16 --saveEngine=assets/export_models/sam/tensorrt/xl1_decoder.engine

Error message:

[02/29/2024-11:18:49] [E] [TRT] ModelImporter.cpp:751: --- End node --- [02/29/2024-11:18:49] [E] [TRT] ModelImporter.cpp:754: ERROR: builtin_op_importers.cpp:4951 In function importFallbackPluginImporter: [8] Assertion failed: creator && "Plugin not found, are the plugin name, version, and namespace correct?" [02/29/2024-11:18:49] [E] Failed to parse onnx file [02/29/2024-11:18:49] [I] Finish parsing network model [02/29/2024-11:18:49] [E] Parsing model failed [02/29/2024-11:18:49] [E] Failed to create engine from model. [02/29/2024-11:18:49] [E] Engine set up failed