dnl13 / ComfyUI-dnl13-seg

I'm working on enabling SAM-HQ and Dino for ComfyUI to easily generate masks automatically, either through automation or prompts.
18 stars 3 forks source link

Import error: module 'cv2.gapi.wip.draw' has no attribute 'Text' #5

Closed alessandroperilli closed 11 months ago

alessandroperilli commented 11 months ago

The installation of your custom node suite (both now and when it was a fork of segment anything) generates the error in the title, and causes a cascade of import failures so that ComfyUI fails to load multiple custom node suites.

To fix the problem, every time I install or update the node suite, I have to follow the recommendation here: https://github.com/Fannovel16/comfyui_controlnet_aux/issues/60

Specifically, I have to kill ComfyUI and issue the following two commands:

pip uninstall -y opencv-python opencv-contrib-python opencv-python-headless pip install opencv-python==4.7.0.72

After that, everything works fine.

dnl13 commented 11 months ago

I've changed opencv-python to version 4.7.0.72 in the requirements.txt and tested it here in a fresh installation. Everything seems to be working at first glance. The issue should be resolved.

If it turns out differently, please let me know.

alessandroperilli commented 11 months ago

Manual git pull from the subfolder, and a pip install -r requirements.txt just to be sure. No errors. Thank you.