diffus-me / sd-webui-facefusion

Next generation face swapper and enhancer
https://join.facefusion.io
92 stars 11 forks source link

Error in OpenCV #13

Open mamegar opened 1 year ago

mamegar commented 1 year ago

Hi,

I'm trying to run Facefusion in Automatic1111. I downloaded ffmpeg, added the extension into Automatic1111. When I run Facefusion I receive the following error.

cv2.destroyAllWindows() # pylint: disable=no-member cv2.error: OpenCV(4.8.1) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1266: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvDestroyAllWindows'

Can you please help?

beansfotos commented 12 months ago

SAME!!!!!

ElhamAhmedian commented 12 months ago

Same, and nothing helps

linjiX commented 12 months ago

Does reinstall opencv-python manually helps?

ElhamAhmedian commented 11 months ago

No, does not help, also removed opencv-headless

ElhamAhmedian commented 11 months ago

You have this hard-coded somehow: cv2.destroyAllWindows() # pylint: disable=no-member cv2.error: OpenCV(4.8.1) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1266: error:

I dont have D:\a

linjiX commented 11 months ago

I do not have a Windows machine to test this issue, the opencv works fine in my mac. Here is a solution I found from the FaceFusion discord channel:

pip install --force-reinstall --no-cache-dir opencv-python==4.8.0.74

ElhamAhmedian commented 11 months ago

Works also on my mac, not on win

ElhamAhmedian commented 11 months ago

Works on windows!!!

rbrtwtrs commented 11 months ago

You have this hard-coded somehow: cv2.destroyAllWindows() # pylint: disable=no-member cv2.error: OpenCV(4.8.1) D:\a\opencv-pythonopencv-python\opencv\modules\highgui\src\window.cpp:1266: error:

I dont have D:\a

Same issue for me

palermo-vie commented 11 months ago

+1

EDIT. fix for me. on windows 10.

activate venv pip install --force-reinstall --no-cache-dir opencv-python==4.8.0.74 thx

rbrtwtrs commented 11 months ago

+1

EDIT. fix for me. on windows 10.

activate venv pip install --force-reinstall --no-cache-dir opencv-python==4.8.0.74 thx

I get the following when I run that:

WARNING: The script f2py.exe is installed in 'C:\Users\rbrtw\AppData\Roaming\Python\Python310\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

I'm using Stability Matrix which generally makes things easier but not this issue. Did you have to run that from a particular directory?

theSplund commented 4 months ago

You have this hard-coded somehow: cv2.destroyAllWindows() # pylint: disable=no-member cv2.error: OpenCV(4.8.1) D:\a\opencv-pythonopencv-python\opencv\modules\highgui\src\window.cpp:1266: error:

My installation (in Windows 10) has that 'hard-coded' into the 'cv2.pyd' file, sat in my '\stable-diffusion-webui-forge\venv\Lib\site-packages\cv2' folder:

Capture