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

This node cannot be loaded,use"pip install opencv-contrib-python" can not fix that #53

Open
foreverwx129 opened this issue Nov 13, 2024 · 2 comments

Comments

@foreverwx129
Copy link

Traceback (most recent call last):
File "F:\envs\ComfyUI\ComfyUI\nodes.py", line 2022, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 940, in exec_module
File "", line 241, in call_with_frames_removed
File "F:\envs\ComfyUI\ComfyUI\custom_nodes\ComfyUI_toyxyz_test_nodes_init
.py", line 12, in
imported_module = importlib.import_module(".{}".format(module_name), name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\envs\ComfyUI\Lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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 "F:\envs\ComfyUI\ComfyUI\custom_nodes\ComfyUI_toyxyz_test_nodes\toyxyz_test_nodes.py", line 13, in
from cv2.ximgproc import guidedFilter
ImportError: cannot import name 'guidedFilter' from 'cv2.ximgproc' (unknown location)

Cannot import F:\envs\ComfyUI\ComfyUI\custom_nodes\ComfyUI_toyxyz_test_nodes module for custom nodes: cannot import name 'guidedFilter' from 'cv2.ximgproc' (unknown location)

@toyxyz
Copy link
Owner

toyxyz commented Nov 13, 2024

Try uninstalling and reinstalling existing installations of opencv.

pip uninstall opencv-python
pip uninstall opencv-contrib-python

pip install opencv-python
pip install opencv-contrib-python

@foreverwx129
Copy link
Author

Thank you very much, I fix it now.

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