Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

google.protobuf.message.DecodeError: Error parsing message #605

Open
2 of 9 tasks
M4NH3X opened this issue Apr 12, 2024 · 7 comments
Open
2 of 9 tasks

google.protobuf.message.DecodeError: Error parsing message #605

M4NH3X opened this issue Apr 12, 2024 · 7 comments
Labels

Comments

@M4NH3X
Copy link

M4NH3X commented Apr 12, 2024

Describe the bug
Face swap alone works, but if I choose enhancer like GFPGAN, Codeformer then I am seeing parsing error message.

My Settings & Setup:
Provider: cuda
Max. memory: 4
Number of threads: 1
Image format: jpg

I installed roop-unleashed via git clone and conda. Let me know if you have more questions.

Error Message (When GFPFAN/Codeformer was selected):

  File "/home/admin/miniconda3/envs/roop/lib/python3.10/site-packages/gradio/utils.py", line 675, in gen_wrapper
    response = next(iterator)
  File "/home/admin/SD/roop-unleashed/ui/tabs/faceswap_tab.py", line 575, in start_swap
    batch_process(list_files_process, use_clip, clip_text, processing_method == "In-Memory processing", imagemask, progress, SELECTED_INPUT_FACE_INDEX)
  File "/home/admin/SD/roop-unleashed/roop/core.py", line 256, in batch_process
    process_mgr.initialize(roop.globals.INPUT_FACESETS, roop.globals.TARGET_FACES, options)
  File "/home/admin/SD/roop-unleashed/roop/ProcessMgr.py", line 96, in initialize
    p.Initialize(devicename)
  File "/home/admin/SD/roop-unleashed/roop/processors/FaceSwapInsightFace.py", line 23, in Initialize
    self.model_swap_insightface = insightface.model_zoo.get_model(model_path, providers=roop.globals.execution_providers)
  File "/home/admin/miniconda3/envs/roop/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 "/home/admin/miniconda3/envs/roop/lib/python3.10/site-packages/insightface/model_zoo/model_zoo.py", line 54, in get_model
    return INSwapper(model_file=self.onnx_file, session=session)
  File "/home/admin/miniconda3/envs/roop/lib/python3.10/site-packages/insightface/model_zoo/inswapper.py", line 16, in __init__
    model = onnx.load(self.model_file)
  File "/home/admin/miniconda3/envs/roop/lib/python3.10/site-packages/onnx/__init__.py", line 208, in load_model
    model = _get_serializer(format, f).deserialize_proto(_load_bytes(f), ModelProto())
  File "/home/admin/miniconda3/envs/roop/lib/python3.10/site-packages/onnx/serialization.py", line 118, in deserialize_proto
    decoded = typing.cast(Optional[int], proto.ParseFromString(serialized))
google.protobuf.message.DecodeError: Error parsing message

Success message (When no enhancer is selected):

Applied providers: ['CUDAExecutionProvider', 'CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}, 'CUDAExecutionProvider': {'tunable_op_max_tuning_duration_ms': '0', 'enable_skip_layer_norm_strict_mode': '0', 'tunable_op_tuning_enable': '0', 'device_id': '0', 'has_user_compute_stream': '0', 'gpu_mem_limit': '18446744073709551615', 'gpu_external_alloc': '0', 'gpu_external_free': '0', 'gpu_external_empty_cache': '0', 'cudnn_conv_algo_search': 'EXHAUSTIVE', 'cudnn_conv1d_pad_to_nc1d': '0', 'arena_extend_strategy': 'kNextPowerOfTwo', 'do_copy_in_default_stream': '1', 'enable_cuda_graph': '0', 'cudnn_conv_use_max_workspace': '1', 'tunable_op_enable': '0'}}
find model: /home/admin/SD/roop-unleashed/models/buffalo_l/w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5
set det-size: (640, 640)
Processing: 100%|█| 39/39 [00:34<00:00,  1.14frame/s, memory_usage=01.64GB, execution_threads
Finished

Details
What OS are you using?

  • Linux
  • Linux in WSL
  • Windows
  • Mac

Are you using a GPU?

  • No. CPU FTW
  • NVIDIA
  • AMD
  • Intel
  • Mac

Which version of roop unleashed are you using?
v3.6.7

@lysxelapsed
Copy link

What's your GPU? Any errors when installing the requirements? Is "Force CPU for Face Analyser" checked by any chance?

@SuperSambat
Copy link

i have same problem, unless im on windows

@lennylen
Copy link

same here, on debian 12. 3090ti. swap works fine but enhancement gives parsing error.

@lysxelapsed
Copy link

Just spitting out googled stuff: try pip uninstall protobuf followed by pip install protobuf

@alonemoz
Copy link

alonemoz commented May 1, 2024

same here. need help

@alonemoz
Copy link

alonemoz commented May 1, 2024

Just spitting out googled stuff: try pip uninstall protobuf followed by pip install protobuf

tried this one and not working

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants