Fix ComfyUI Error occurred when executing DWPreprocessor

Fix Error occurred when executing DWPreprocessor:

‘NoneType’ object has no attribute ‘get_providers’

print(f”Failed to load onnxruntime with {self.det.get_providers()}.\nPlease change EP_list in the config.yaml and restart ComfyUI”)

Esay way:

Don’t use the “onnx” model, use the “pt” model instead

The harder way:

1.go to your ComfyUI installation directory \sdComfyUI\ComfyUI_windows_portable\update
run update_comfyui.bat

2.Uninstall and reinstall the following dependencies
*You need to change ‘Your_comfyui_installation_directory’ to your ComfyUI installation path

cd /D Your_comfyui_installation_directory\ComfyUI_windows_portable

python_embeded\python.exe -m pip uninstall -y onnxruntime onnxruntime-gpu
python_embeded\python.exe -m pip install onnxruntime
python_embeded\python.exe -m pip uninstall -y opencv-python
python_embeded\python.exe -m pip install opencv-python
python_embeded\python.exe -m pip uninstall -y opencv-python-headless
python_embeded\python.exe -m pip install opencv-python-headless

Share this content: