InvalidProtocolBufferException when I add onnx model

When I add onnx model to my project unity shows an error:

So I can’t add onnx model as NNModel field in unity inspector. Any ideas? What should I do?
I’m trying to follow this guide

Most likely your your onnx file is broken. Could you please post it here?

I’ve take onnx file from here

ok, i figured it out.
It was wrong version of onnx model format.

if you have same problem:

  1. go to barakuda github
  2. go to barracuda-release/Tools/requirements.txt
  3. there is a line with onnx version requirement
  4. find model with version you need

Having the same problem. Does step 4 mean that the model was created with the same onnx version as used by the current barracuda release (from requirements.txt)?

This is a really frustrating issue. Trying to get the asset import working for 2 days now.

If you are getting a error in Google.Protobuf the problem is most likely that your onnx model is corrupted.
Try loading it in onnxruntime to see if it complains.
If you manage to load it in onnxruntime, we might have a problem on our end