lllyasviel / ControlNet

Let us control diffusion models!
Apache License 2.0
28.97k stars 2.62k forks source link

Errors when using Midas Depth Map and Openpose Preprocessors in ComfyUI #621

Closed halifax109 closed 6 months ago

halifax109 commented 6 months ago

I am trying to use workflows that use depth maps and openpose to create images in ComfyUI. However, I am getting these errors which relate to the preprocessor nodes. Using an openpose image in the Load Image node works but I haven't tried using a depth map image. I have also deleted and reinstalled the ControlNet Auxillary Preprocessor custom nodes twice but still get these errors. Please help.

Error occurred when executing MiDaS-DepthMapPreprocessor:

[Errno 2] No such file or directory: 'C:\Users\recif\OneDrive\Desktop\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux\ckpts\lllyasviel/Annotators\cache\models--lllyasviel--Annotators\blobs\501f0c75b3bca7daec6b3682c5054c09b366765aef6fa3a09d03a5cb4b230853.incomplete'

File "C:\Users\recif\OneDrive\Desktop\StableDiffusion\ComfyUI_windows_portable\ComfyUI\execution.py", line 154, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\recif\OneDrive\Desktop\StableDiffusion\ComfyUI_windows_portable\ComfyUI\execution.py", line 84, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\recif\OneDrive\Desktop\StableDiffusion\ComfyUI_windows_portable\ComfyUI\execution.py", line 77, in map_node_over_list results.append(getattr(obj, func)(*slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\recif\OneDrive\Desktop\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux\node_wrappers\midas.py", line 45, in execute model = MidasDetector.from_pretrained(HF_MODEL_NAME, cache_dir=annotator_ckpts_path).to(model_management.get_torch_device()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\recif\OneDrive\Desktop\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\controlnet_aux\midas__init__.py", line 21, in from_pretrained model_path = custom_hf_download(pretrained_model_or_path, filename, cache_dir=cache_dir, subfolder=subfolder) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\recif\OneDrive\Desktop\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\controlnet_aux\util.py", line 244, in custom_hf_download model_path = hf_hub_download(repo_id=pretrained_model_or_path, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\recif\OneDrive\Desktop\StableDiffusion\ComfyUI_windows_portable\python_embeded\Lib\site-packages\huggingface_hub\utils_validators.py", line 118, in _inner_fn return fn(args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\recif\OneDrive\Desktop\StableDiffusion\ComfyUI_windows_portable\python_embeded\Lib\site-packages\huggingface_hub\file_download.py", line 1449, in hf_hub_download with temp_file_manager() as temp_file: File "contextlib.py", line 137, in enter File "C:\Users\recif\OneDrive\Desktop\StableDiffusion\ComfyUI_windows_portable\python_embeded\Lib\site-packages\huggingface_hub\file_download.py", line 1433, in _resumable_file_manager with open(incomplete_path, "ab") as f: ^^^^^^^^^^^^^^^^^^^^^^^^^^^

Error occurred when executing OpenposePreprocessor:

[Errno 2] No such file or directory: 'C:\Users\recif\OneDrive\Desktop\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux\ckpts\lllyasviel/Annotators\cache\models--lllyasviel--Annotators\blobs\25a948c16078b0f08e236bda51a385d855ef4c153598947c28c0d47ed94bb746.incomplete'

File "C:\Users\recif\OneDrive\Desktop\StableDiffusion\ComfyUI_windows_portable\ComfyUI\execution.py", line 154, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\recif\OneDrive\Desktop\StableDiffusion\ComfyUI_windows_portable\ComfyUI\execution.py", line 84, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\recif\OneDrive\Desktop\StableDiffusion\ComfyUI_windows_portable\ComfyUI\execution.py", line 77, in map_node_over_list results.append(getattr(obj, func)(*slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\recif\OneDrive\Desktop\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux\node_wrappers\openpose.py", line 27, in estimate_pose model = OpenposeDetector.from_pretrained(HF_MODEL_NAME, cache_dir=annotator_ckpts_path).to(model_management.get_torch_device()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\recif\OneDrive\Desktop\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\controlnet_aux\open_pose__init__.py", line 127, in from_pretrained body_model_path = custom_hf_download(pretrained_model_or_path, filename, cache_dir=cache_dir, subfolder=subfolder) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\recif\OneDrive\Desktop\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\controlnet_aux\util.py", line 244, in custom_hf_download model_path = hf_hub_download(repo_id=pretrained_model_or_path, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\recif\OneDrive\Desktop\StableDiffusion\ComfyUI_windows_portable\python_embeded\Lib\site-packages\huggingface_hub\utils_validators.py", line 118, in _inner_fn return fn(args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\recif\OneDrive\Desktop\StableDiffusion\ComfyUI_windows_portable\python_embeded\Lib\site-packages\huggingface_hub\file_download.py", line 1449, in hf_hub_download with temp_file_manager() as temp_file: File "contextlib.py", line 137, in enter File "C:\Users\recif\OneDrive\Desktop\StableDiffusion\ComfyUI_windows_portable\python_embeded\Lib\site-packages\huggingface_hub\file_download.py", line 1433, in _resumable_file_manager with open(incomplete_path, "ab") as f: ^^^^^^^^^^^^^^^^^^^^^^^^^^^

halifax109 commented 6 months ago

Discovered that my issue was related to the path length being too long. After removing the max path limits in Windows Powershell, my issue was resolved.