hacksider / Deep-Live-Cam

real time face swap and one-click video deepfake with only a single image
GNU Affero General Public License v3.0
41.22k stars 6.01k forks source link

[Solved] inswapper_128_fp16.onnx failed:Protobuf parsing failed #697

Closed nevidomyy closed 1 month ago

nevidomyy commented 1 month ago

I have this error on macOS Apple Silicon. Exception in Tkinter callback Traceback (most recent call last): File "/opt/homebrew/Cellar/python@3.10/3.10.15/Frameworks/Python.framework/Versions/3.10/lib/python3.10/tkinter/__init__.py", line 1921, in __call__ return self.func(*args) File "/Users//PycharmProjects/Deep-Live-Cam/.venv/lib/python3.10/site-packages/customtkinter/windows/widgets/ctk_button.py", line 554, in _clicked self._command() File "/Users/PycharmProjects/Deep-Live-Cam/modules/ui.py", line 242, in <lambda> command=lambda: webcam_preview( File "/Users/PycharmProjects/Deep-Live-Cam/modules/ui.py", line 649, in webcam_preview create_webcam_preview( File "/Users/PycharmProjects/Deep-Live-Cam/modules/ui.py", line 707, in create_webcam_preview temp_frame = frame_processor.process_frame(source_image, temp_frame) File "/Users/PycharmProjects/Deep-Live-Cam/modules/processors/frame/face_swapper.py", line 65, in process_frame temp_frame = swap_face(source_face, target_face, temp_frame) File "/Users/PycharmProjects/Deep-Live-Cam/modules/processors/frame/face_swapper.py", line 49, in swap_face return get_face_swapper().get(temp_frame, target_face, source_face, paste_back=True) File "/Users/PycharmProjects/Deep-Live-Cam/modules/processors/frame/face_swapper.py", line 44, in get_face_swapper FACE_SWAPPER = insightface.model_zoo.get_model(model_path, providers=modules.globals.execution_providers) File "/Users/PycharmProjects/Deep-Live-Cam/.venv/lib/python3.10/site-packages/insightface/model_zoo/model_zoo.py", line 96, in get_model model = router.get_model(providers=providers, provider_options=provider_options) File "/Users/PycharmProjects/Deep-Live-Cam/.venv/lib/python3.10/site-packages/insightface/model_zoo/model_zoo.py", line 40, in get_model session = PickableInferenceSession(self.onnx_file, **kwargs) File "/Users/PycharmProjects/Deep-Live-Cam/.venv/lib/python3.10/site-packages/insightface/model_zoo/model_zoo.py", line 25, in __init__ super().__init__(model_path, **kwargs) File "/Users/PycharmProjects/Deep-Live-Cam/.venv/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 347, in __init__ self._create_inference_session(providers, provider_options, disabled_optimizers) File "/Users/PycharmProjects/Deep-Live-Cam/.venv/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 384, 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 /Users/PycharmProjects/Deep-Live-Cam/models/inswapper_128_fp16.onnx failed:Protobuf parsing failed.

This https://github.com/hacksider/Deep-Live-Cam/issues/613 didn't help.

suresh-3x commented 1 month ago

Download this model and put it inside the models folder. This fixed the issue for me.

nevidomyy commented 1 month ago

Download this model and put it inside the models folder. This fixed the issue for me.

Yes this model work! But very low fps in Live mode. Maybe on windows and nvidia works fine. (

zhoufanglu commented 1 month ago

Download this model and put it inside the models folder. This fixed the issue for me.

it's work, thanks

leihuayi commented 1 month ago

Download this model and put it inside the models folder. This fixed the issue for me.

This model not not work for me (running on Debian with CUDA), I get a 47MB file, while the 265MB file from github assets mentioned in #717 works correctly.

hacksider commented 1 month ago

Download this model and put it inside the models folder. This fixed the issue for me.

This model not not work for me (running on Debian with CUDA), I get a 47MB file, while the 265MB file from github assets mentioned in #717 works correctly.

Thhere might be a problem on your download since it's 277mb and not 47mb image

ConnoisseurProtege commented 3 weeks ago

Download this model and put it inside the models folder. This fixed the issue for me.

This model not not work for me (running on Debian with CUDA), I get a 47MB file, while the 265MB file from github assets mentioned in #717 works correctly.

Thhere might be a problem on your download since it's 277mb and not 47mb image

Is this the same model as the one linked in the readme? I noticed that the one I downloaded thru the link is much larger and isn't named the same?(doesn't seem to be fp16)

KRSHH commented 3 weeks ago

https://huggingface.co/hacksider/deep-live-cam/resolve/main/inswapper_128_fp16.onnx?download=true