lllyasviel / lllyasviel/ControlNet
Getting an error when using open pose
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34.1k
- Forks
- 3k
- PR merge metrics
- No merged PRs in 30d
Description
I'm just trying open pose for the first time in img2img.
Have uploaded an image to img2img.
Chosen a control image in ControlNet.
Chose openpose for preprocessor and control_openpose-fp16 [9ca67cc5] for the model.
I am getting the error as follows:
```
Loading model: control_openpose-fp16 [9ca67cc5]
Loaded state_dict from [C:\stable-diffusion-webui-directml\extensions\sd-webui-controlnet\models\control_openpose-fp16.safetensors]
ControlNet model control_openpose-fp16 [9ca67cc5] loaded.
Loading preprocessor: openpose
Error running process: C:\local\sd\stable-diffusion-webui-directml\extensions\sd-webui-controlnet\scripts\controlnet.py
Traceback (most recent call last):
File "C:\local\sd\stable-diffusion-webui-directml\modules\scripts.py", line 386, in process
script.process(p, *script_args)
File "C:\local\sd\stable-diffusion-webui-directml\extensions\sd-webui-controlnet\scripts\controlnet.py", line 652, in process
detected_map = preprocessor(input_image, res=pres, thr_a=pthr_a, thr_b=pthr_b)
File "C:\local\sd\stable-diffusion-webui-directml\extensions\sd-webui-controlnet\scripts\processor.py", line 129, in openpose
result, _ = model_openpose(img, has_hand)
File "C:\local\sd\stable-diffusion-webui-directml\extensions\sd-webui-controlnet\annotator\openpose\__init__.py", line 50, in apply_openpose
candidate, subset = body_estimation(oriImg)
File "C:\local\sd\stable-diffusion-webui-directml\extensions\sd-webui-controlnet\annotator\openpose\body.py", line 57, in __call__
heatmap = cv2.resize(heatmap, (0, 0), fx=stride, fy=stride, interpolation=cv2.INTER_CUBIC)
cv2.error: OpenCV(4.7.0) :-1: error: (-5:Bad argument) in function 'resize'
> Overload resolution failed:
> - src data type = 23 is not supported
> - Expected Ptr for argument 'src'
```
Any ideas what I could have done wrong?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with extensions/sd-webui-controlnet/scripts/processor.py and annotator/openpose/body.py, following the openpose call from the traceback. Reproduce the img2img workflow with the stated preprocessor and model, then inspect the OpenCV resize failure and related environment or input handling. Done means openpose preprocessing completes without the reported cv2.error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- opencv, python
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100