"Protobuf parsing failed" when onnxruntime opens a quantized model

Hello

I used optimum 1.18 to create a quantized onnx model:

optimum-cli onnxruntime quantize --avx2 --onnx_model model.onnx --output quantized_model.onnx

Then I tried to open quantized_model.onnx with C++ API onnxruntime-1.17.1 shared library but it was rejected due to “Protobuf parsing failed”.

Notes. 1) the same onnxruntime binary is able to open and load non-quantized model.onnx. 2) the quantized model can be opened with Netron.

Anyone has an idea what I am missing?
Thank you