stable-diffusion-webui-forge icon indicating copy to clipboard operation
stable-diffusion-webui-forge copied to clipboard

Error [SSL: CERTIFICATE_VERIFY_FAILED] when using controlnet on webui forge (window OS)

Open phongthuong opened this issue 1 year ago • 3 comments

image I got an error when using controlnet, I don't know how to fix it, I hope you can help me, thank you!

2024-10-04 14:19:15,813 - ControlNet - INFO - Preview Resolution = 512 [Unload] Trying to free 3072.00 MB for cuda:0 with 0 models keep loaded ... Done. Downloading: "https://huggingface.co/lllyasviel/Annotators/resolve/main/body_pose_model.pth" to E:\TEST\webui_forge_cu121_torch231\webui\models\ControlNetPreprocessor\openpose\body_pose_model.pth

Traceback (most recent call last): File "urllib\request.py", line 1348, in do_open File "http\client.py", line 1282, in request File "http\client.py", line 1328, in _send_request File "http\client.py", line 1277, in endheaders File "http\client.py", line 1037, in _send_output File "http\client.py", line 975, in send File "http\client.py", line 1454, in connect File "ssl.py", line 513, in wrap_socket File "ssl.py", line 1071, in _create File "ssl.py", line 1342, in do_handshake ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "E:\TEST\webui_forge_cu121_torch231\system\python\lib\site-packages\gradio\queueing.py", line 536, in process_events response = await route_utils.call_process_api( File "E:\TEST\webui_forge_cu121_torch231\system\python\lib\site-packages\gradio\route_utils.py", line 285, in call_process_api output = await app.get_blocks().process_api( File "E:\TEST\webui_forge_cu121_torch231\system\python\lib\site-packages\gradio\blocks.py", line 1923, in process_api result = await self.call_function( File "E:\TEST\webui_forge_cu121_torch231\system\python\lib\site-packages\gradio\blocks.py", line 1508, in call_function prediction = await anyio.to_thread.run_sync( # type: ignore File "E:\TEST\webui_forge_cu121_torch231\system\python\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "E:\TEST\webui_forge_cu121_torch231\system\python\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "E:\TEST\webui_forge_cu121_torch231\system\python\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, *args) File "E:\TEST\webui_forge_cu121_torch231\system\python\lib\site-packages\gradio\utils.py", line 818, in wrapper response = f(*args, **kwargs) File "E:\TEST\webui_forge_cu121_torch231\webui\extensions-builtin\sd_forge_controlnet\lib_controlnet\controlnet_ui\controlnet_ui_group.py", line 775, in run_annotator result = preprocessor( File "E:\TEST\webui_forge_cu121_torch231\webui\extensions-builtin\forge_legacy_preprocessors\scripts\legacy_preprocessors.py", line 103, in call result, is_image = self.call_function(img=input_image, res=resolution, thr_a=slider_1, thr_b=slider_2, **kwargs) File "E:\TEST\webui_forge_cu121_torch231\webui\extensions-builtin\forge_legacy_preprocessors\legacy_preprocessors\preprocessor.py", line 311, in run_model return remove_pad(self.model_openpose( File "E:\TEST\webui_forge_cu121_torch231\webui\extensions-builtin\forge_legacy_preprocessors\annotator\openpose_init_.py", line 447, in call poses = self.detect_poses(oriImg, include_hand, include_face) File "E:\TEST\webui_forge_cu121_torch231\webui\extensions-builtin\forge_legacy_preprocessors\annotator\openpose_init_.py", line 333, in detect_poses self.load_model() File "E:\TEST\webui_forge_cu121_torch231\webui\extensions-builtin\forge_legacy_preprocessors\annotator\openpose_init_.py", line 208, in load_model load_file_from_url(body_model_path, model_dir=self.model_dir) File "E:\TEST\webui_forge_cu121_torch231\webui\modules\modelloader.py", line 40, in load_file_from_url download_url_to_file(url, cached_file, progress=progress, hash_prefix=hash_prefix) File "E:\TEST\webui_forge_cu121_torch231\system\python\lib\site-packages\torch\hub.py", line 622, in download_url_to_file u = urlopen(req) File "urllib\request.py", line 216, in urlopen File "urllib\request.py", line 525, in open File "urllib\request.py", line 634, in http_response File "urllib\request.py", line 557, in error File "urllib\request.py", line 496, in _call_chain File "urllib\request.py", line 749, in http_error_302 File "urllib\request.py", line 519, in open File "urllib\request.py", line 536, in _open File "urllib\request.py", line 496, in _call_chain File "urllib\request.py", line 1391, in https_open File "urllib\request.py", line 1351, in do_open urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>

phongthuong avatar Oct 04 '24 07:10 phongthuong

same problem image

gasiaai avatar Oct 04 '24 10:10 gasiaai

@phongthuong Forge has tried to automatically download preprocessor models needed for openpose controlnet, but hasn't been able to. I've tested on my computer and it all worked correctly, so either there was a temporary error with the source site or there is a problem with your computer and/or connection. You can web search the error on the final line and get many possible options. Are you behind a proxy or firewall that might be blocking access? Try going to https://huggingface.co/lllyasviel/Annotators/tree/main and manually downloading - you need body_pose_model.pth, hand_pose_model.pth and facenet.pth for openpose and these models need to be placed in {forge install directory}\webui\models\ControlNetPreprocessor\openpose. (as shown at the start of the error message)

@ganauou your problem is different. You'll have to explain what you were doing.

DenOfEquity avatar Oct 05 '24 00:10 DenOfEquity

I'm having the exact same problem, it was working fine and suddenly it stopped

atap87 avatar Oct 07 '24 04:10 atap87

@phongthuong Forge has tried to automatically download preprocessor models needed for openpose controlnet, but hasn't been able to. I've tested on my computer and it all worked correctly, so either there was a temporary error with the source site or there is a problem with your computer and/or connection. You can web search the error on the final line and get many possible options. Are you behind a proxy or firewall that might be blocking access? Try going to https://huggingface.co/lllyasviel/Annotators/tree/main and manually downloading - you need body_pose_model.pth, hand_pose_model.pth and facenet.pth for openpose and these models need to be placed in {forge install directory}\webui\models\ControlNetPreprocessor\openpose. (as shown at the start of the error message)

@ganauou your problem is different. You'll have to explain what you were doing.

For me only canny and lineart work

atap87 avatar Oct 12 '24 06:10 atap87

@phongthuong Forge has tried to automatically download preprocessor models needed for openpose controlnet, but hasn't been able to. I've tested on my computer and it all worked correctly, so either there was a temporary error with the source site or there is a problem with your computer and/or connection. You can web search the error on the final line and get many possible options. Are you behind a proxy or firewall that might be blocking access? Try going to https://huggingface.co/lllyasviel/Annotators/tree/main and manually downloading - you need body_pose_model.pth, hand_pose_model.pth and facenet.pth for openpose and these models need to be placed in {forge install directory}\webui\models\ControlNetPreprocessor\openpose. (as shown at the start of the error message)

@ganauou your problem is different. You'll have to explain what you were doing.

Would you please tell which to download manually for depth, and also what folder?

Thanks

atap87 avatar Oct 12 '24 22:10 atap87

In general, at the start of the error message in the console it'll say what it was trying to download and where it would put it. For zoe-depth: file is ZoeD_M12_N.pt, destination is {forge install directory}\webui\models\ControlNetPreprocessor\zoedepth For midas: file is dpt_hybrid-midas-501f0c75.pt, destination is {forge install directory}\webui\models\ControlNetPreprocessor\midas

DenOfEquity avatar Oct 12 '24 23:10 DenOfEquity