Skip to content

Commit 1004973

Browse files
authored
Merge pull request AUTOMATIC1111#30 from shirayu/add_auto_dependency_install
Auto install opencv-python if not installed
2 parents 9a9fab4 + f57e0fb commit 1004973

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ Thanks & Inspired: kohya-ss/sd-webui-additional-networks
1717

1818
### Install
1919

20-
Some users may need to install the cv2 library before installing it: `pip install opencv-python`
21-
2220
Install prettytable if you want to use img2seg preprocessor: `pip install prettytable`
2321

2422
1. Open "Extensions" tab.

install.py

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import launch
2+
3+
if not launch.is_installed("opencv-python"):
4+
launch.run_pip("install opencv-python", "requirement for sd-webui-controlnet")

0 commit comments

Comments
 (0)