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

Fix problem AttributeError: module 'cv2.gapi.wip.draw' has no attribute 'Text' #111

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

FavorMylikes
Copy link

It's a Opencv conflict

Which is mentioned here

@riccardobiagi
Copy link

Hi, the command works for me, but when I restart ComfyUI the next day the problem comes back.. And I have to launch the fix command again for it to work... Is it normal? How to fix it permanently? Thank you

@FavorMylikes
Copy link
Author

Hi, the command works for me, but when I restart ComfyUI the next day the problem comes back.. And I have to launch the fix command again for it to work... Is it normal? How to fix it permanently? Thank you

@riccardobiagi

I'm not very sure, maybe it depends on the way how you use comfyui.

Here are some of my guesses

  • Docker environment
    • If you restart it with some command like docker composer up --build, it will recreate the whole docker environment.
  • If you have a comfyui plugin or custom_nodes, it will check all the requirements from node git directors, and install all miss packages.

My advice

Make sure that all projects run under an independent environment separately.

In my experience, conda is better than venv

@riccardobiagi
Copy link

Hi, the command works for me, but when I restart ComfyUI the next day the problem comes back.. And I have to launch the fix command again for it to work... Is it normal? How to fix it permanently? Thank you

@riccardobiagi

I'm not very sure, maybe it depends on the way how you use comfyui.

Here are some of my guesses

  • Docker environment

    • If you restart it with some command like docker composer up --build, it will recreate the whole docker environment.
  • If you have a comfyui plugin or custom_nodes, it will check all the requirements from node git directors, and install all miss packages.

My advice

Make sure that all projects run under an independent environment separately.

In my experience, conda is better than venv

Hi FavorMyLikes, thanks a lot for the feedback! Unfortunately I'm really not a pyton/terminal guy..
I'm using a Mac M1 and I think I'm using conda (but who knows? :( ) . I start comfyui with this code:

cd ComfyUI
python main.py --force-fp16

I have some custom nodes

Untill recently everything was working good, then I don't know what happened (maybe updating) to cause this problem that cause controlnet and other custom nodes to stop working. I see messages like:
Cannot import /Users/../ComfyUI/custom_nodes/comfyui_controlnet_aux module for custom nodes: module 'cv2.gapi.wip.draw' has no attribute 'Text'

Any help will be much appreciated :(

@FavorMylikes
Copy link
Author

Hi, the command works for me, but when I restart ComfyUI the next day the problem comes back.. And I have to launch the fix command again for it to work... Is it normal? How to fix it permanently? Thank you

@riccardobiagi
I'm not very sure, maybe it depends on the way how you use comfyui.
Here are some of my guesses

  • Docker environment

    • If you restart it with some command like docker composer up --build, it will recreate the whole docker environment.
  • If you have a comfyui plugin or custom_nodes, it will check all the requirements from node git directors, and install all miss packages.

My advice
Make sure that all projects run under an independent environment separately.
In my experience, conda is better than venv

Hi FavorMyLikes, thanks a lot for the feedback! Unfortunately I'm really not a pyton/terminal guy.. I'm using a Mac M1 and I think I'm using conda (but who knows? :( ) . I start comfyui with this code:

cd ComfyUI python main.py --force-fp16

I have some custom nodes

Untill recently everything was working good, then I don't know what happened (maybe updating) to cause this problem that cause controlnet and other custom nodes to stop working. I see messages like: Cannot import /Users/../ComfyUI/custom_nodes/comfyui_controlnet_aux module for custom nodes: module 'cv2.gapi.wip.draw' has no attribute 'Text'

Any help will be much appreciated :(

conda and venv are two useful Python environment managers, you can just type conda activate some_name into an independent environment, it's a good habit before you start your comfyui.

Here are some introductions.

@riccardobiagi
Copy link

Hi, the command works for me, but when I restart ComfyUI the next day the problem comes back.. And I have to launch the fix command again for it to work... Is it normal? How to fix it permanently? Thank you

@riccardobiagi
I'm not very sure, maybe it depends on the way how you use comfyui.
Here are some of my guesses

  • Docker environment

    • If you restart it with some command like docker composer up --build, it will recreate the whole docker environment.
  • If you have a comfyui plugin or custom_nodes, it will check all the requirements from node git directors, and install all miss packages.

My advice
Make sure that all projects run under an independent environment separately.
In my experience, conda is better than venv

Hi FavorMyLikes, thanks a lot for the feedback! Unfortunately I'm really not a pyton/terminal guy.. I'm using a Mac M1 and I think I'm using conda (but who knows? :( ) . I start comfyui with this code:
cd ComfyUI python main.py --force-fp16
I have some custom nodes
Untill recently everything was working good, then I don't know what happened (maybe updating) to cause this problem that cause controlnet and other custom nodes to stop working. I see messages like: Cannot import /Users/../ComfyUI/custom_nodes/comfyui_controlnet_aux module for custom nodes: module 'cv2.gapi.wip.draw' has no attribute 'Text'
Any help will be much appreciated :(

conda and venv are two useful Python environment managers, you can just type conda activate some_name into an independent environment, it's a good habit before you start your comfyui.

Here are some introductions.

Thank you man, I'll check it out!

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

Successfully merging this pull request may close these issues.

2 participants