[ONNXRuntimeError] : 7 : INVALID_PROTOBUF while trying to run hugging face repo in WSL = Windows Subsystem LINUX

[ONNXRuntimeError] : 7 : INVALID_PROTOBUF while trying to run hugging face repo in WSL = Windows Subsystem LINUX

I am trying to run Nymbo/Virtual-Try-On at main in my local server based on ubuntu, I had set it up, installed the libraries yet getting [ONNXRuntimeError] : 7 : INVALID_PROTOBUF.

Although I was able to run this repository successfully on google colab.

Error in detail:

python app.py

/home/ubuntu/VTON-env/lib/python3.10/site-packages/huggingface_hub/file_download.py:1142: FutureWarning: resume_download is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use force_download=True.

warnings.warn(

The config attributes {‘decay’: 0.9999, ‘inv_gamma’: 1.0, ‘min_decay’: 0.0, ‘optimization_step’: 37000, ‘power’: 0.6666666666666666, ‘update_after_step’: 0, ‘use_ema_warmup’: False} were passed to UNet2DConditionModel, but are not expected and will be ignored. Please verify your config.json configuration file.

Some weights of the model checkpoint were not used when initializing UNet2DConditionModel:

[‘add_embedding.linear_1.bias, add_embedding.linear_1.weight, add_embedding.linear_2.bias, add_embedding.linear_2.weight’]

Traceback (most recent call last):

File “/home/ubuntu/Virtual-Try-On/app.py”, line 93, in

parsing_model = Parsing(0)

File “/home/ubuntu/Virtual-Try-On/preprocess/humanparsing/run_parsing.py”, line 20, in init

self.session = ort.InferenceSession(os.path.join(Path(file).absolute().parents[2].absolute(), ‘ckpt/humanparsing/parsing_atr.onnx’),

File “/home/ubuntu/VTON-env/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py”, line 419, in init

self._create_inference_session(providers, provider_options, disabled_optimizers)

File “/home/ubuntu/VTON-env/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py”, line 452, 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 /home/ubuntu/Virtual-Try-On/ckpt/humanparsing/parsing_atr.onnx failed:Protobuf parsing failed.

I will be really thankful if anyone can help me resolve this error.

1 Like

This is similar, but I think it’s a different library.
However, the cause and solution are probably similar to this.