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

Inquiry Regarding Recommended OpenCV Version for facerestore_cf #7

Open
JMD2023 opened this issue Oct 21, 2023 · 7 comments
Open

Inquiry Regarding Recommended OpenCV Version for facerestore_cf #7

JMD2023 opened this issue Oct 21, 2023 · 7 comments

Comments

@JMD2023
Copy link

JMD2023 commented Oct 21, 2023

Hello,

I am currently working on setting up the facerestore_cf project on my local machine. I have OpenCV version 4.8.1 installed, but I am encountering some issues which I suspect may be related to the OpenCV version I am using. Specifically, when I attempt to load ComfyUI, I receive the following error:

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'

I was wondering if there is a specific version of OpenCV that is recommended or required for this project? It would be very helpful to know the recommended or minimum required version of OpenCV to ensure compatibility and smooth operation of the project.

Additionally, if there are other specific versions of dependencies that are required, it would be great to have that information as well.

Thank you very much for your assistance and for your work on this project.

@JMD2023
Copy link
Author

JMD2023 commented Oct 23, 2023

Hey guys, I just happened to install https://github.com/WASasquatch/was-node-suite-comfyui and the issue was resolved (probably a cross-dependency that fixed the problem).

Anyway, a response would still be interesting.

Hint, now OpenCV is in version 4.7.0 ;D

@mav-rik
Copy link
Owner

mav-rik commented Oct 30, 2023

@JMD2023 I am wondering if adding opencv-python-headless[ffmpeg]<=4.7.0.72 to requirements.txt fixes the issue. I can not check it myself though. Can you check that and reply please?

@Arcitec
Copy link

Arcitec commented Dec 9, 2023

@mav-rik Correct. facerestore_cf requires OpenCV 4.7.* (latest version of 4.7 branch).

Please, is there any chance that you could look at this and add OpenCV 4.8+ support?

Because OpenCV 4.8 contains lots of fixes for ONNX, CUDA, neural network performance etc:

https://www.phoronix.com/news/OpenCV-4.8

@Thanh1122kkll
Copy link

opencv-python-headless[ffmpeg]<=4.7.0.72. i added the code to file the install requirements, cvopenai errors still happend

@Thanh1122kkll
Copy link

i uninstall opencv 4.8 and then installing opencv 4.7, facerestore node still show " File "C:\ComfyUI_windows_portable\python_embeded\lib\site-packages\cv2\typing_init_.py", line 157, 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]
AttributeError: module 'cv2.gapi.wip.draw' has no attribute 'Text'"

@Arcitec
Copy link

Arcitec commented Dec 30, 2023

@Thanh1122kkll I had a similar issue after a while. Not sure why. So I went back even lower, downgrading opencv to 4.6.*. Now it works. It's ridiculous that so many ComfyUI custom nodes haven't upgraded past a 2 year old version of OpenCV.

@tosalance
Copy link

Hey guys, I just happened to install https://github.com/WASasquatch/was-node-suite-comfyui and the issue was resolved (probably a cross-dependency that fixed the problem).

Anyway, a response would still be interesting.

Hint, now OpenCV is in version 4.7.0 ;D

omg, this really work, thank you for this. I try to fix this all day but no help. so many thank for this

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

No branches or pull requests

5 participants