Closed Six6pounder closed 6 months ago
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)
Also, if you aren't using ImpactPack, you could remove it.
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 "
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 "
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 "
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 "
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
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'
It looks like it could be this: https://github.com/cubiq/ComfyUI_IPAdapter_plus/issues/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
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
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
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
Closing this issue in a tidy up, feel free to reopen if you're still having issues.
Issue Report
Description
When running the script
main.py
in, the program encounters an unexpected behavior. I tried to install usingpip install -r requirements.txt
inside ComfyUI-Impact-Pack folder and alsoPython install.py
but still the same error. I also ran./scripts/clone_plugins.sh
after cloning the repoSteps to Reproduce
main.py
with the commandpython main.py --listen 0.0.0.0
.Expected Behavior
The script should run without any issues and provide the expected output.
Actual Behavior
The script encounters an issue during execution.
Environment