lllyasviel / lllyasviel/ControlNet
bug on openpose
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
Traceback (most recent call last):
File "/root/miniconda3/envs/xl_env/lib/python3.10/urllib/request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/root/miniconda3/envs/xl_env/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/root/miniconda3/envs/xl_env/lib/python3.10/http/client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/root/miniconda3/envs/xl_env/lib/python3.10/http/client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/root/miniconda3/envs/xl_env/lib/python3.10/http/client.py", line 1037, in _send_output
self.send(msg)
File "/root/miniconda3/envs/xl_env/lib/python3.10/http/client.py", line 975, in send
self.connect()
File "/root/miniconda3/envs/xl_env/lib/python3.10/http/client.py", line 1454, in connect
self.sock = self._context.wrap_socket(self.sock,
File "/root/miniconda3/envs/xl_env/lib/python3.10/ssl.py", line 513, in wrap_socket
return self.sslsocket_class._create(
File "/root/miniconda3/envs/xl_env/lib/python3.10/ssl.py", line 1071, in _create
self.do_handshake()
File "/root/miniconda3/envs/xl_env/lib/python3.10/ssl.py", line 1342, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/miniconda3/envs/xl_env/lib/python3.10/site-packages/gradio/routes.py", line 337, in run_predict
output = await app.get_blocks().process_api(
File "/root/miniconda3/envs/xl_env/lib/python3.10/site-packages/gradio/blocks.py", line 1015, in process_api
result = await self.call_function(
File "/root/miniconda3/envs/xl_env/lib/python3.10/site-packages/gradio/blocks.py", line 833, in call_function
prediction = await anyio.to_thread.run_sync(
File "/root/miniconda3/envs/xl_env/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/root/miniconda3/envs/xl_env/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/root/miniconda3/envs/xl_env/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/root/autodl-tmp/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet_ui/controlnet_ui_group.py", line 636, in run_annotator
result, is_image = preprocessor(
File "/root/autodl-tmp/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/utils.py", line 79, in decorated_func
return cached_func(*args, **kwargs)
File "/root/autodl-tmp/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/utils.py", line 67, in cached_func
return func(*args, **kwargs)
File "/root/autodl-tmp/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/global_state.py", line 35, in unified_preprocessor
return preprocessor_modules[preprocessor_name](*args, **kwargs)
File "/root/autodl-tmp/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/processor.py", line 251, in run_model
return remove_pad(self.model_openpose(
File "/root/autodl-tmp/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 "/root/autodl-tmp/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/openpose/__init__.py", line 268, in detect_poses
self.load_model()
File "/root/autodl-tmp/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/openpose/__init__.py", line 192, in load_model
load_file_from_url(body_model_path, model_dir=self.model_dir)
File "/root/miniconda3/envs/xl_env/lib/python3.10/site-packages/basicsr/utils/download_util.py", line 98, in load_file_from_url
download_url_to_file(url, cached_file, hash_prefix=None, progress=progress)
File "/root/miniconda3/envs/xl_env/lib/python3.10/site-packages/torch/hub.py", line 597, in download_url_to_file
u = urlopen(req)
File "/root/miniconda3/envs/xl_env/lib/python3.10/urllib/request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "/root/miniconda3/envs/xl_env/lib/python3.10/urllib/request.py", line 519, in open
response = self._open(req, data)
File "/root/miniconda3/envs/xl_env/lib/python3.10/urllib/request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/root/miniconda3/envs/xl_env/lib/python3.10/urllib/request.py", line 496, in _call_chain
result = func(*args)
File "/root/miniconda3/envs/xl_env/lib/python3.10/urllib/request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/root/miniconda3/envs/xl_env/lib/python3.10/urllib/request.py", line 1351, in do_open
raise URLError(err)
urllib.error.URLError:
Any idea what I cando to correct the issue?
Thanks in advance
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 annotator/openpose/__init__.py, especially load_model and detect_poses, then trace the download through basicsr's load_file_from_url and torch.hub.download_url_to_file. Reproduce loading an OpenPose annotator and determine whether the failure is in model retrieval or the surrounding environment; done means the annotator loads without the reported certificate error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100