Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'cv2.typing' #5

Closed
MoonMoon82 opened this issue Jun 3, 2024 · 1 comment
Closed

ModuleNotFoundError: No module named 'cv2.typing' #5

MoonMoon82 opened this issue Jun 3, 2024 · 1 comment

Comments

@MoonMoon82
Copy link

MoonMoon82 commented Jun 3, 2024

Hi!

since any of the last commits I get this error message while comfyui starts up:

Traceback (most recent call last):
  File "E:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1879, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "E:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-faceless-node\__init__.py", line 1, in <module>
    from .faceless.nodes.globals import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
  File "E:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-faceless-node\faceless\nodes\globals.py", line 9, in <module>
    from .nodes_face_swap import NodesFaceSwap
  File "E:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-faceless-node\faceless\nodes\nodes_face_swap.py", line 12, in <module>
    from ..processors.face_swapper import process_images
  File "E:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-faceless-node\faceless\processors\face_swapper.py", line 12, in <module>
    from ..processors.face_analyser import get_average_face, get_many_faces, get_one_face
  File "E:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-faceless-node\faceless\processors\face_analyser.py", line 10, in <module>
    from ..face_helper import create_static_anchors, distance_to_bounding_box, distance_to_face_landmark_5, warp_face_by_face_landmark_5, warp_face_by_translation, estimate_matrix_by_face_landmark_5, categorize_age, categorize_gender, apply_nms, convert_face_landmark_68_to_5
  File "E:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-faceless-node\faceless\face_helper.py", line 6, in <module>
    from cv2.typing import Size
ModuleNotFoundError: No module named 'cv2.typing'

I already checked opencv:

E:\StableDiffusion\ComfyUI_windows_portable\python_embeded>python.exe -m pip install opencv-python
Requirement already satisfied: opencv-python in e:\stablediffusion\comfyui_windows_portable\python_embeded\lib\site-packages (4.9.0.80)
Requirement already satisfied: numpy>=1.21.2 in e:\stablediffusion\comfyui_windows_portable\python_embeded\lib\site-packages (from opencv-python) (1.26.4)

I'm using stand-alone ComfyUI and I installed the faceless nodes by using ComfyUI Manager.
Any suggestions how to fix it?

Kind regards!

@jeffy5
Copy link
Owner

jeffy5 commented Jun 4, 2024

It seems to be an issue with opencv-python. You can check this related issue: opencv-python issue 869.

You can try upgrading the dependency with pip install --upgrade --force-reinstall opencv-python-headless==4.8.0.76.

@jeffy5 jeffy5 closed this as completed Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants