lllyasviel / lllyasviel/ControlNet

Issue with openpose

Open
#432 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
34.1k
Forks
3k
PR merge metrics
No merged PRs in 30d

Description

Hi,
I'm having an issue using openpose in controlNet, other models work well but that one throws an error whenever I try to load any of the openpose annotators

`2023-06-07 19:29:51,330 - ControlNet - INFO - Loading model: control_v11p_sd15_openpose [cab727d4]
2023-06-07 19:29:52,033 - ControlNet - INFO - Loaded state_dict from [C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\models\control_v11p_sd15_openpose.pth]
2023-06-07 19:29:52,034 - ControlNet - INFO - Loading config: C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\models\control_v11p_sd15_openpose.yaml
2023-06-07 19:29:55,878 - ControlNet - INFO - ControlNet model control_v11p_sd15_openpose [cab727d4] loaded.
2023-06-07 19:29:56,034 - ControlNet - INFO - Loading preprocessor: openpose_full
2023-06-07 19:29:56,035 - ControlNet - INFO - preprocessor resolution = 512
Error running process: C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py
Traceback (most recent call last):
File "C:\Users\flow workstation 2\stable-diffusion-webui\modules\scripts.py", line 451, in process
script.process(p, *script_args)
File "C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 786, in process
detected_map, is_image = preprocessor(input_image, res=preprocessor_resolution, thr_a=unit.threshold_a, thr_b=unit.threshold_b)
File "C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\utils.py", line 76, in decorated_func
return cached_func(*args, **kwargs)
File "C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\utils.py", line 64, in cached_func
return func(*args, **kwargs)
File "C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\global_state.py", line 35, in unified_preprocessor
return preprocessor_modules[preprocessor_name](*args, **kwargs)
File "C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\processor.py", line 251, in run_model
return remove_pad(self.model_openpose(
File "C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\openpose\__init__.py", line 324, in __call__
poses = self.detect_poses(oriImg, include_hand, include_face)
File "C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\openpose\__init__.py", line 268, in detect_poses
self.load_model()
File "C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\openpose\__init__.py", line 203, in load_model
self.hand_estimation = Hand(hand_modelpath)
File "C:\Users\flow workstation 2\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\openpose\hand.py", line 21, in __init__
model_dict = util.transfer(self.model, torch.load(model_path))
File "C:\Users\flow workstation 2\stable-diffusion-webui\modules\safe.py", line 107, in load
return load_with_extra(filename, *args, extra_handler=global_extra_handler, **kwargs)
File "C:\Users\flow workstation 2\stable-diffusion-webui\modules\safe.py", line 152, in load_with_extra
return unsafe_torch_load(filename, *args, **kwargs)
File "C:\Users\flow workstation 2\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 795, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "C:\Users\flow workstation 2\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 1020, in _legacy_load
typed_storage._storage._set_from_file(
RuntimeError: unexpected EOF, expected 15718 more bytes. The file might be corrupted.`

Any idea what I cando to correct the issue?

Thanks in advance

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with annotator/openpose/__init__.py and annotator/openpose/hand.py, following the model load through modules/safe.py and PyTorch serialization. Reproduce the openpose annotator failure and verify which model file is being loaded; completion would require a confirmed cause and a documented or tested correction, but the issue does not specify a requested code change.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
computer-vision, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.