C++ ONNXRuntime CUDA EP VAE Encoder Error
#166
by
bertaye
- opened
Hi everyone,
I am using ONNXRuntime in C++, with CUDA EP.
VAE Encoder's ONNX model has dynamic I/O, so in order to resolve Output tensor shape I first connect an input then running the model via ONNX and resolving the output tensor shape (this worked without error for every model I've tried up to now).
For VAE Encoder model however, I've tried connecting tensors with different shapes (1x3x512x512 , 1x3x1024x1024, 1x3x128x12) but ORT throws same error each time.
For 1x3x1024x1024:
[ERROR]: ONNXRT: [model]: Non-zero status code returned while running Add node. Name:'/encoder/mid_block/attentions.0/Add_1' Status Message: /encoder/mid_block/attentions.0/Add_1: right operand cannot broadcast on dim 3 LeftShape: {1,1,16384,512}, RightShape: {1,512,128,128}
For 1x3x256x256
[ERROR]: ONNXRT: [model]: Non-zero status code returned while running Add node. Name:'/encoder/mid_block/attentions.0/Add_1' Status Message: /encoder/mid_block/attentions.0/Add_1: right operand cannot broadcast on dim 3 LeftShape: {1,1,1024,512}, RightShape: {1,512,32,32}
Can you please help me?
CUDA Version: 11.8
ONNXRT Version: 1.17.1