Fannovel16 / comfyui_controlnet_aux

ComfyUI's ControlNet Auxiliary Preprocessors
Apache License 2.0
2.28k stars 209 forks source link

ComfyUI - No module named 'skimage' 'cv2' etc. #156

Open MarcinSoj opened 11 months ago

MarcinSoj commented 11 months ago

Hi i have problem with : No module named 'skimage'

[comfyui_controlnet_aux] | INFO -> Using ckpts path: C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux\ckpts [comfyui_controlnet_aux] | INFO -> Using symlinks: False [comfyui_controlnet_aux] | INFO -> Using ort providers: ['CUDAExecutionProvider', 'DirectMLExecutionProvider', 'OpenVINOExecutionProvider', 'ROCMExecutionProvider', 'CPUExecutionProvider']

Full error log from comfyui_controlnet_aux: Traceback (most recent call last): File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux__init.py", line 32, in load_nodes module = importlib.import_module( ^^^^^^^^^^^^^^^^^^^^^^^^ File "importlib__init__.py", line 126, in import_module File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux\node_wrappers\dwpose.py", line 5, in from controlnet_aux.dwpose import DwposeDetector, AnimalposeDetector File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\controlnet_aux\dwpose\init__.py", line 19, in from .hand import Hand File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\controlnet_aux\dwpose\hand.py", line 10, in from skimage.measure import label ModuleNotFoundError: No module named 'skimage'

[comfyui_controlnet_aux] | INFO -> Some nodes failed to load: Failed to import module dwpose because ModuleNotFoundError: No module named 'skimage'

Check that you properly installed the dependencies. If you think this is a bug, please report it on the github page (https://github.com/Fannovel16/comfyui_controlnet_aux/issues)

The way i got rid of it was by forcing ComfyUI using this command : ..\python_embeded\python.exe -s -m pip install --upgrade --pre torch torchvision torchaudio opencv-python matplotlib skimage scikit-image simpleeval --extra-index-url https://download.pytorch.org/whl/nightly/cu121 -r ../ComfyUI/requirements.txt pygit2

I checked your install.bat file and requirements.txt but it looks like some requirements are missing and when i want to install them they do not want to be installed when i edit requirements.txt. So i had to force : update_comfyui_and_python_dependencies.bat to install the, for me.

Hope it will help everyone who have problem with this.

dxyklp commented 10 months ago

I used your method but it still didn't work out and it seems that something is not installed

code

error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [3 lines of output]

  *** Please install the `scikit-image` package (instead of `skimage`) ***

  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

leez7onefl commented 5 months ago

Hi,

I faced some pretty similar issues, maybe this will help : #371