Fannovel16 / comfyui_controlnet_aux

ComfyUI's ControlNet Auxiliary Preprocessors
Apache License 2.0
2.04k stars 201 forks source link

Error occurred when executing DWPreprocessor #280

Open verolwh opened 5 months ago

verolwh commented 5 months ago

Error occurred when executing DWPreprocessor:

OpenCV(4.7.0) D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\onnx\onnx_importer.cpp:270: error: (-5:Bad argument) Can't read ONNX file: D:\ComfyUI-aki(1)\ComfyUI-aki-v1.2\ComfyUI-aki-v1.2\custom_nodes\comfyui_controlnet_aux\ckpts\yzd-v/DWPose\dw-ll_ucoco_384.onnx in function 'cv::dnn::dnn4_v20221220::ONNXImporter::ONNXImporter'

Checked the relevant information, path problem? model problem? environmental problems? now i do not know how to solve, hope to help me solve

verolwh commented 5 months ago

TopK operators may not work on your OpenCV, try use onnxruntime with CPUExecutionProvider DWPose: Caching OpenCV DNN module dw-ll_ucoco_384.onnx on cv2.DNN... !!! Exception during processing !!! Traceback (most recent call last): File "D:\项目\AI项目\AI绘画\ComfyUI-aki(1)\ComfyUI-aki-v1.2\ComfyUI-aki-v1.2\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "D:\项目\AI项目\AI绘画\ComfyUI-aki(1)\ComfyUI-aki-v1.2\ComfyUI-aki-v1.2\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "D:\项目\AI项目\AI绘画\ComfyUI-aki(1)\ComfyUI-aki-v1.2\ComfyUI-aki-v1.2\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "D:\项目\AI项目\AI绘画\ComfyUI-aki(1)\ComfyUI-aki-v1.2\ComfyUI-aki-v1.2\custom_nodes\comfyui_controlnet_aux\node_wrappers\dwpose.py", line 72, in estimate_pose model = DwposeDetector.from_pretrained( File "D:\项目\AI项目\AI绘画\ComfyUI-aki(1)\ComfyUI-aki-v1.2\ComfyUI-aki-v1.2\custom_nodes\comfyui_controlnet_aux\src\controlnet_aux\dwpose__init__.py", line 179, in from_pretrained t = Wholebody(None, pose_model_path, torchscript_device=torchscript_device) File "D:\项目\AI项目\AI绘画\ComfyUI-aki(1)\ComfyUI-aki-v1.2\ComfyUI-aki-v1.2\custom_nodes\comfyui_controlnet_aux\src\controlnet_aux\dwpose\wholebody.py", line 69, in init self.pose = cv2.dnn.readNetFromONNX(pose_model_path) cv2.error: OpenCV(4.7.0) D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\onnx\onnx_importer.cpp:270: error: (-5:Bad argument) Can't read ONNX file: D:\项目\AI项目\AI绘画\ComfyUI-aki(1)\ComfyUI-aki-v1.2\ComfyUI-aki-v1.2\custom_nodes\comfyui_controlnet_aux\ckpts\yzd-v/DWPose\dw-ll_ucoco_384.onnx in function 'cv::dnn::dnn4_v20221220::ONNXImporter::ONNXImporter'