Comments (9)
Can you find out which dependency is missing?
Try temporarily changing line 67 in ComfyUI/custom_nodes/ComfyUI-Impact-Pack/__init__.py
To:
except ImportError as e:
missing_dependency = str(e).split("No module named ")[-1]
print(f"### ComfyUI-Impact-Pack is missing dependency: {missing_dependency}")
exit(1)
from cog-comfyui.
It looks like it could be this:
cubiq/ComfyUI_IPAdapter_plus#251
https://github.com/Gourieff/comfyui-reactor-node#iv-controlnet-aux-node-import-failed-error-when-using-with-reactor-node
Try changing cog.yaml
from:
-- opencv-python-headless>=4.0.1.24
+- opencv-python-headless>=4.9.0.80
from cog-comfyui.
pip install opencv-python==4.6.0.66
seems to have fixed that issue, now it runs correctly. No idea why it works with that specific version
from cog-comfyui.
Also, if you aren't using ImpactPack, you could remove it.
from cog-comfyui.
Can you find out which dependency is missing?
Try temporarily changing line 67 in
ComfyUI/custom_nodes/ComfyUI-Impact-Pack/__init__.py
To:
except ImportError as e: missing_dependency = str(e).split("No module named ")[-1] print(f"### ComfyUI-Impact-Pack is missing dependency: {missing_dependency}") exit(1)
This is the output, sorry for the delay. I'm unsure if the Python exception triggered
### Loading: ComfyUI-Impact-Pack (V4.76.1)
Traceback (most recent call last):
File "/src/ComfyUI/nodes.py", line 1893, in load_custom_node
module_spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/src/ComfyUI/custom_nodes/ComfyUI-Impact-Pack/__init__.py", line 49, in <module>
import impact.subpack_nodes # This import must be done before cv2.
File "/src/ComfyUI/custom_nodes/ComfyUI-Impact-Pack/impact_subpack/impact/subpack_nodes.py", line 3, in <module>
import impact.core as core
File "/src/ComfyUI/custom_nodes/ComfyUI-Impact-Pack/modules/impact/core.py", line 4, in <module>
from impact.utils import *
File "/src/ComfyUI/custom_nodes/ComfyUI-Impact-Pack/modules/impact/utils.py", line 3, in <module>
import cv2
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/cv2/__init__.py", line 181, in <module>
bootstrap()
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/cv2/__init__.py", line 175, in bootstrap
if __load_extra_py_code_for_module("cv2", submodule, DEBUG):
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/cv2/__init__.py", line 28, in __load_extra_py_code_for_module
py_module = importlib.import_module(module_name)
File "/root/.pyenv/versions/3.10.6/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/cv2/typing/__init__.py", line 156, in <module>
Prim = _typing.Union[cv2.gapi.wip.draw.Text, cv2.gapi.wip.draw.Circle, cv2.gapi.wip.draw.Image, cv2.gapi.wip.draw.Line, cv2.gapi.wip.draw.Rect, cv2.gapi.wip.draw.Mosaic, cv2.gapi.wip.draw.Poly]
AttributeError: module 'cv2.gapi.wip.draw' has no attribute 'Text'
Cannot import /src/ComfyUI/custom_nodes/ComfyUI-Impact-Pack module for custom nodes: module 'cv2.gapi.wip.draw' has no attribute 'Text'
Efficiency Nodes: Attempting to add Control Net options to the 'HiRes-Fix Script' Node (comfyui_controlnet_aux add-on)...Failed!
Efficiency Nodes: Attempting to add 'AnimatedDiff Script' Node (ComfyUI-AnimateDiff-Evolved add-on)...[AnimateDiffEvo] - ERROR - No motion models found. Please download one and place in: ['/src/ComfyUI/custom_nodes/ComfyUI-AnimateDiff-Evolved/models', '/src/ComfyUI/models/animatediff_models']
Efficiency Nodes: Attempting to add 'AnimatedDiff Script' Node (ComfyUI-AnimateDiff-Evolved add-on)...Failed!
Efficiency Nodes Warning: Failed to import python package 'simpleeval'; related nodes disabled.
[AnimateDiffEvo] - ERROR - No motion models found. Please download one and place in: ['/src/ComfyUI/custom_nodes/ComfyUI-AnimateDiff-Evolved/models', '/src/ComfyUI/models/animatediff_models']
Traceback (most recent call last):
File "/src/ComfyUI/nodes.py", line 1893, in load_custom_node
module_spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/src/ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite/__init__.py", line 1, in <module>
from .videohelpersuite.nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
File "/src/ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite/videohelpersuite/nodes.py", line 15, in <module>
from .load_video_nodes import LoadVideoUpload, LoadVideoPath
File "/src/ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite/videohelpersuite/load_video_nodes.py", line 5, in <module>
import cv2
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/cv2/__init__.py", line 181, in <module>
bootstrap()
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/cv2/__init__.py", line 175, in bootstrap
if __load_extra_py_code_for_module("cv2", submodule, DEBUG):
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/cv2/__init__.py", line 28, in __load_extra_py_code_for_module
py_module = importlib.import_module(module_name)
File "/root/.pyenv/versions/3.10.6/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/cv2/typing/__init__.py", line 93, in <module>
MatLike = _typing.Union[cv2.mat_wrapper.Mat, NumPyArrayGeneric]
AttributeError: partially initialized module 'cv2' has no attribute 'mat_wrapper' (most likely due to a circular import)
Cannot import /src/ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite module for custom nodes: partially initialized module 'cv2' has no attribute 'mat_wrapper' (most likely due to a circular import)
Traceback (most recent call last):
File "/src/ComfyUI/nodes.py", line 1893, in load_custom_node
module_spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/src/ComfyUI/custom_nodes/comfyui_controlnet_aux/__init__.py", line 2, in <module>
from .utils import here, create_node_input_types
File "/src/ComfyUI/custom_nodes/comfyui_controlnet_aux/utils.py", line 4, in <module>
import cv2
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/cv2/__init__.py", line 181, in <module>
bootstrap()
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/cv2/__init__.py", line 175, in bootstrap
if __load_extra_py_code_for_module("cv2", submodule, DEBUG):
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/cv2/__init__.py", line 28, in __load_extra_py_code_for_module
py_module = importlib.import_module(module_name)
File "/root/.pyenv/versions/3.10.6/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/cv2/typing/__init__.py", line 93, in <module>
MatLike = _typing.Union[cv2.mat_wrapper.Mat, NumPyArrayGeneric]
AttributeError: partially initialized module 'cv2' has no attribute 'mat_wrapper' (most likely due to a circular import)
Cannot import /src/ComfyUI/custom_nodes/comfyui_controlnet_aux module for custom nodes: partially initialized module 'cv2' has no attribute 'mat_wrapper' (most likely due to a circular import)
Traceback (most recent call last):
File "/src/ComfyUI/nodes.py", line 1893, in load_custom_node
module_spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/src/ComfyUI/custom_nodes/was-node-suite-comfyui/__init__.py", line 1, in <module>
from .WAS_Node_Suite import NODE_CLASS_MAPPINGS
File "/src/ComfyUI/custom_nodes/was-node-suite-comfyui/WAS_Node_Suite.py", line 14105, in <module>
import cv2
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/cv2/__init__.py", line 181, in <module>
bootstrap()
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/cv2/__init__.py", line 175, in bootstrap
if __load_extra_py_code_for_module("cv2", submodule, DEBUG):
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/cv2/__init__.py", line 28, in __load_extra_py_code_for_module
py_module = importlib.import_module(module_name)
File "/root/.pyenv/versions/3.10.6/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/cv2/typing/__init__.py", line 93, in <module>
MatLike = _typing.Union[cv2.mat_wrapper.Mat, NumPyArrayGeneric]
AttributeError: partially initialized module 'cv2' has no attribute 'mat_wrapper' (most likely due to a circular import)
Cannot import /src/ComfyUI/custom_nodes/was-node-suite-comfyui module for custom nodes: partially initialized module 'cv2' has no attribute 'mat_wrapper' (most likely due to a circular import)
Traceback (most recent call last):
File "/src/ComfyUI/nodes.py", line 1893, in load_custom_node
module_spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/src/ComfyUI/custom_nodes/ComfyUI_InstantID/__init__.py", line 1, in <module>
from .InstantID import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
File "/src/ComfyUI/custom_nodes/ComfyUI_InstantID/InstantID.py", line 7, in <module>
import cv2
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/cv2/__init__.py", line 181, in <module>
bootstrap()
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/cv2/__init__.py", line 175, in bootstrap
if __load_extra_py_code_for_module("cv2", submodule, DEBUG):
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/cv2/__init__.py", line 28, in __load_extra_py_code_for_module
py_module = importlib.import_module(module_name)
File "/root/.pyenv/versions/3.10.6/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/cv2/typing/__init__.py", line 93, in <module>
MatLike = _typing.Union[cv2.mat_wrapper.Mat, NumPyArrayGeneric]
AttributeError: partially initialized module 'cv2' has no attribute 'mat_wrapper' (most likely due to a circular import)
Cannot import /src/ComfyUI/custom_nodes/ComfyUI_InstantID module for custom nodes: partially initialized module 'cv2' has no attribute 'mat_wrapper' (most likely due to a circular import)
Import times for custom nodes:
0.0 seconds: /src/ComfyUI/custom_nodes/ComfyUI-AnimateDiff-Evolved
0.0 seconds: /src/ComfyUI/custom_nodes/ComfyUI-Logic
0.0 seconds: /src/ComfyUI/custom_nodes/masquerade-nodes-comfyui
0.0 seconds: /src/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus
0.0 seconds: /src/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale
0.0 seconds (IMPORT FAILED): /src/ComfyUI/custom_nodes/comfyui_controlnet_aux
0.0 seconds: /src/ComfyUI/custom_nodes/ComfyUI-BRIA_AI-RMBG
0.0 seconds (IMPORT FAILED): /src/ComfyUI/custom_nodes/ComfyUI_InstantID
0.0 seconds (IMPORT FAILED): /src/ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite
0.0 seconds: /src/ComfyUI/custom_nodes/ComfyUI-Custom-Scripts
0.0 seconds: /src/ComfyUI/custom_nodes/Derfuu_ComfyUI_ModdedNodes
0.0 seconds: /src/ComfyUI/custom_nodes/ComfyUI_tinyterraNodes
0.0 seconds: /src/ComfyUI/custom_nodes/ComfyUI-PhotoMaker
0.0 seconds: /src/ComfyUI/custom_nodes/ComfyUI-Advanced-ControlNet
0.0 seconds (IMPORT FAILED): /src/ComfyUI/custom_nodes/ComfyUI-Impact-Pack
0.0 seconds: /src/ComfyUI/custom_nodes/ComfyUI-Inspire-Pack
0.0 seconds: /src/ComfyUI/custom_nodes/ComfyUI_essentials
0.1 seconds: /src/ComfyUI/custom_nodes/efficiency-nodes-comfyui
0.6 seconds: /src/ComfyUI/custom_nodes/ComfyUI_FizzNodes
0.7 seconds: /src/ComfyUI/custom_nodes/ComfyUI_Comfyroll_CustomNodes
0.8 seconds (IMPORT FAILED): /src/ComfyUI/custom_nodes/was-node-suite-comfyui
1.0 seconds: /src/ComfyUI/custom_nodes/comfyui_segment_anything
1.1 seconds: /src/ComfyUI/custom_nodes/comfyui-reactor-node
Starting server
To see the GUI go to: http://0.0.0.0:8188
from cog-comfyui.
Can you find out which dependency is missing?
Try temporarily changing line 67 in
ComfyUI/custom_nodes/ComfyUI-Impact-Pack/__init__.py
To:
except ImportError as e: missing_dependency = str(e).split("No module named ")[-1] print(f"### ComfyUI-Impact-Pack is missing dependency: {missing_dependency}") exit(1)
I edited the code as:
except Exception as e:
# import importlib
# print("### ComfyUI-Impact-Pack: Reinstall dependencies (several dependencies are missing.)")
# do_install()
missing_dependency = str(e).split("No module named ")[-1]
print(f"### ComfyUI-Impact-Pack is missing dependency: {missing_dependency}")
exit(1)
and the output is:
### Loading: ComfyUI-Impact-Pack (V4.76.1)
### ComfyUI-Impact-Pack is missing dependency: module 'cv2.gapi.wip.draw' has no attribute 'Text'
from cog-comfyui.
It looks like it could be this: cubiq/ComfyUI_IPAdapter_plus#251 https://github.com/Gourieff/comfyui-reactor-node#iv-controlnet-aux-node-import-failed-error-when-using-with-reactor-node
Try changing
cog.yaml
from:-- opencv-python-headless>=4.0.1.24 +- opencv-python-headless>=4.9.0.80
Still the same output, just to be sure that I have the right opencv version installed I ran:
root@e94e1ff32d71:/src/ComfyUI# pip show opencv-python-headless
Name: opencv-python-headless
Version: 4.9.0.80
Summary: Wrapper package for OpenCV python bindings.
Home-page: https://github.com/opencv/opencv-python
Author:
Author-email:
License: Apache 2.0
Location: /root/.pyenv/versions/3.10.6/lib/python3.10/site-packages
Requires: numpy, numpy, numpy, numpy
Required-by: albumentations
from cog-comfyui.
pip install opencv-python==4.6.0.66
seems to have fixed that issue, now it runs correctly. No idea why it works with that specific version
@fofr Sorry for all these messages, I should have tested before but I noticed it only works if inside the cog I remove and then reinstall with pip install opencv-python==4.6.0.66
otherwise I get the error I posted above, in the cog.yaml
I have set the 4.6.0.66 version but it won't work until inside the docker I reinstall it.
Also If I restart the cog machine I get the same error again.
To make it work basically I have to:
sudo cog run -p 8188 bash
pip uninstall opencv-python
pip install opencv-python==4.6.0.66
from cog-comfyui.
Closing this issue in a tidy up, feel free to reopen if you're still having issues.
from cog-comfyui.
Related Issues (20)
- StyleAligned Workflow HOT 4
- API Issue with MaskFromRGBCMYBW node from Comfy Essentials HOT 7
- 3D Pack support HOT 3
- Can you get back an output that is not an image? HOT 4
- TensorRT falls back to other execution providers - Image rembg (remove background) from WAS suite HOT 2
- Seems to download Controlnet processors on each run? HOT 5
- request for custom node addition (https://github.com/kijai/ComfyUI-IC-Light) HOT 2
- Request for adding LoRa from: https://civitai.com/models/7252/charturnerbeta-lora-experimental HOT 1
- Please add SUPIR upscaler HOT 1
- Please add ComfyUI-Gaffer HOT 2
- Please add HD Helper HOT 3
- Updating Gourieff/comfyui-reactor-node Node HOT 3
- Request for adding animate diff LoRa from shatterAnimatediff_v10 HOT 1
- Custom validation failed for node: image - Invalid image file HOT 4
- StyleAligned Nodes HOT 1
- Request for adding custom node mikey_nodes, for FilePrefixNode HOT 2
- use the Github repo as a template to roll your own HOT 1
- Error downloading weights in ComfyUI/models/ultralytics/segm HOT 6
- Request for addition of Lama remover (object) (e.g. - https://github.com/sipherxyz/comfyui-art-venture)
- Running a dedicated instance
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cog-comfyui.