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

cv2.ximgproc #2

Open
drtentaculous opened this issue Mar 24, 2023 · 5 comments
Open

cv2.ximgproc #2

drtentaculous opened this issue Mar 24, 2023 · 5 comments

Comments

@drtentaculous
Copy link

drtentaculous commented Mar 24, 2023

hi, i can't run extension a of cv2.ximgproc.

I tried to reinstall it using these commands but it didn't work.

pip uninstall opencv-contrib-python opencv-python

pip install opencv-contrib-python

log :

Error running install.py for extension extensions\stable-diffusion-webui-adverse-cleaner-tab.
Command: "E:\ia\stable-diffusion-webui\venv\Scripts\python.exe" "extensions\stable-diffusion-webui-adverse-cleaner-tab\install.py"
Error code: 1
stdout:
stderr: Traceback (most recent call last):
File "E:\ia\stable-diffusion-webui\extensions\stable-diffusion-webui-adverse-cleaner-tab\install.py", line 3, in
if not launch.is_installed("cv2.ximgproc"):
File "E:\ia\stable-diffusion-webui\launch.py", line 127, in is_installed
spec = importlib.util.find_spec(package)
File "C:\Python310\lib\importlib\util.py", line 114, in find_spec
raise ValueError('{}.spec is None'.format(name))
ValueError: cv2.ximgproc.spec is None

@drtentaculous
Copy link
Author

I managed to fix it by removing --user in the install.py file

@Quansheng2021
Copy link

I managed to fix it by removing --user in the install.py file

indeed

@p1atdev
Copy link
Owner

p1atdev commented Mar 25, 2023

Very strange...
In my environment, another error occurred when I didn't have --user and I couldn't install opencv-contrib-python

@p1atdev
Copy link
Owner

p1atdev commented Mar 26, 2023

ah, I figured it out. When venv is enabled, the --user flag is not needed

I finally found the problem. During webui running it uses opencv, so this extension can't modify opencv package and install any additional module of opencv.

So we need to install opencv-contrib-python by hand when webui is not running.

@Dawgmastah
Copy link

Did do that... but it says already satisfied, still wont work in webui

(venv) X:\STABLEDIFFUSION\AUTOMATIC11111>pip install opencv-contrib-python
Requirement already satisfied: opencv-contrib-python in x:\stablediffusion\automatic11111\venv\lib\site-packages (4.9.0.80)
Requirement already satisfied: numpy>=1.17.3 in x:\stablediffusion\automatic11111\venv\lib\site-packages (from opencv-contrib-python) (1.23.5)

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

4 participants