stable-diffusion-webui-adverse-cleaner-tab icon indicating copy to clipboard operation
stable-diffusion-webui-adverse-cleaner-tab copied to clipboard

cv2.ximgproc

Open drtentaculous opened this issue 2 years ago • 5 comments

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 avatar Mar 24 '23 22:03 drtentaculous

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

drtentaculous avatar Mar 24 '23 23:03 drtentaculous

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

indeed

Quansheng2021 avatar Mar 25 '23 14:03 Quansheng2021

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

p1atdev avatar Mar 25 '23 14:03 p1atdev

~~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.

p1atdev avatar Mar 26 '23 12:03 p1atdev

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)

Dawgmastah avatar Feb 12 '24 00:02 Dawgmastah