cubiq / ComfyUI_IPAdapter_plus

GNU General Public License v3.0
4.06k stars 308 forks source link

InsightFaceLoader not working. "module 'cv2.gapi.wip.draw' has no attribute 'Text'" #251

Closed waynoedm closed 8 months ago

waynoedm commented 9 months ago

New install of ComfyUI. IPAdapter Plus itself works fine. However, the it isn't working with InsightFace models.

Error occurred when executing InsightFaceLoader:

module 'cv2.gapi.wip.draw' has no attribute 'Text'

File "C:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(*slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 535, in load_insight_face from insightface.app import FaceAnalysis File "C:\AI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface__init__.py", line 16, in from . import model_zoo File "C:\AI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface\model_zoo__init__.py", line 1, in from .model_zoo import get_model File "C:\AI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface\model_zoo\model_zoo.py", line 11, in from .arcface_onnx import File "C:\AI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface\model_zoo\arcface_onnx.py", line 9, in import cv2 File "C:\AI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\cv2__init__.py", line 181, in bootstrap() File "C:\AI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\cv2__init.py", line 175, in bootstrap if load_extra_py_code_for_module("cv2", submodule, DEBUG): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\cv2__init.py", line 28, in load_extra_py_code_for_module py_module = importlib.import_module(module_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "importlib__init.py", line 126, in import_module File "C:\AI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\cv2\typing\init__.py", line 156, in 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] ^^^^^^^^^^^^^^^^^^^^^^

cubiq commented 8 months ago

this feels like some problem with your environment. I would try to resinstall insightface

procomp91 commented 8 months ago

Had this problem because I also had reactor installed. disabling/uninstalling it did the trick. I finally got them both running at the same time using the solution from this thread: https://github.com/Gourieff/comfyui-reactor-node/issues/139