Protobuf parsing failed

#2
by PartyParrot - opened

When running the ONNX Runtime example, I get the following error message:

$ python onnx/inference_onnx.py \
  --text "The complete model now runs through ONNX Runtime." \
  --output sample-onnx.wav \
  --provider cpu \
  --seed 7
Traceback (most recent call last):
  File "/work/Inflect-Micro-v2-ONNX/onnx/inference_onnx.py", line 229, in <module>
    main()
  File "/work/Inflect-Micro-v2-ONNX/onnx/inference_onnx.py", line 217, in main
    engine = InflectONNX(args.model_dir, provider=args.provider)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/Inflect-Micro-v2-ONNX/onnx/inference_onnx.py", line 117, in __init__
    self.duration = ort.InferenceSession(
                    ^^^^^^^^^^^^^^^^^^^^^
  File "/home/testuser/testenv/lib/python3.12/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 534, in __init__
    self._create_inference_session(providers, provider_options, disabled_optimizers)
  File "/home/testuser/testenv/lib/python3.12/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 629, in _create_inference_session
    sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
onnxruntime.capi.onnxruntime_pybind11_state.InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from /work/Inflect-Micro-v2-ONNX/onnx/duration.onnx failed:Protobuf parsing failed.

Thanks for reporting this - its likely a download problem. I just downloaded and tested the published file again, and it works on my end. Could you check your local file?

"ls -l onnx/duration.onnx
sha256sum onnx/duration.onnx"

The size should be 7,322,687 bytes. The SHA-256 should be: b728ca2564b9e5b7d6cf5e446f65e02a6fe2f1880ba281466fec93a667dd2388

If it still does not work, tell me, and I'll dig into it further.

Sign up or log in to comment