[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 LINUXI am trying to runNymbo/Virtual-Try-On at mainin 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:pythonapp.py/home/ubuntu/VTON-env/lib/python3.10/site-packages/huggingface_hub/file_download.py:1142: FutureWarning:resume_downloadis deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, useforce_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, inparsing_model = Parsing(0)File “/home/ubuntu/Virtual-Try-On/preprocess/humanparsing/run_parsing.py”, line 20, ininitself.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, ininitself._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_sessionsess = 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.
2024-11-07T12:06:57Z
This is similar, but I think it’s a different library.However, the cause and solution are probably similar to this.github.com/hacksider/Deep-Live-Cam[ONNXRuntimeError] : 7 : INVALID_PROTOBUFopened12:47AM - 13 Aug 24 UTCclosed06:06AM - 23 Oct 24 UTCAleksoooxdTraceback (most recent call last):
  File "C:\Program Files\Python311\Lib\tkint…er\__init__.py", line 1948, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "Deep-Live-Cam\venv\Lib\site-packages\customtkinter\windows\widgets\ctk_button.py", line 554, in _clicked
    self._command()
  File "Deep-Live-Cam\modules\ui.py", line 104, in <lambda>
    live_button = ctk.CTkButton(root, text='Live', cursor='hand2', command=lambda: webcam_preview())
                                                                                   ^^^^^^^^^^^^^^^^
  File "Deep-Live-Cam\modules\ui.py", line 281, in webcam_preview
    source_image = get_one_face(cv2.imread(modules.globals.source_path))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "Deep-Live-Cam\modules\face_analyser.py", line 20, in get_one_face
    face = get_face_analyser().get(frame)
           ^^^^^^^^^^^^^^^^^^^
  File "Deep-Live-Cam\modules\face_analyser.py", line 14, in get_face_analyser
    FACE_ANALYSER = insightface.app.FaceAnalysis(name='buffalo_l', providers=modules.globals.execution_providers)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "Deep-Live-Cam\venv\Lib\site-packages\insightface\app\face_analysis.py", line 31, in __init__
    model = model_zoo.get_model(onnx_file, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "Deep-Live-Cam\venv\Lib\site-packages\insightface\model_zoo\model_zoo.py", line 96, in get_model
    model = router.get_model(providers=providers, provider_options=provider_options)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "Deep-Live-Cam\venv\Lib\site-packages\insightface\model_zoo\model_zoo.py", line 40, in get_model
    session = PickableInferenceSession(self.onnx_file, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "Deep-Live-Cam\venv\Lib\site-packages\insightface\model_zoo\model_zoo.py", line 25, in __init__
    super().__init__(model_path, **kwargs)
  File "Deep-Live-Cam\venv\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 419, in __init__
    self._create_inference_session(providers, provider_options, disabled_optimizers)
  File "Deep-Live-Cam\venv\Lib\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 User/.insightface\models\buffalo_l\1k3d68.onnx failed:Protobuf parsing failed.

At first i forgot to install ffmpeg so while waiting for it to install i ran the program after I've commented the pre_check line which responds for checking if ffmpeg is installed. It worked fine, besides the fact that i had a black square instead of the face i wantet and it was quite laggy but after a few second i got a blue screen. So now I finally installed ffmpeg and while the "launcher" works just fine the preview obviously doesnt really load as the error would suggest. Anyone had a similar problem/ knows the fix to this issue?