[Stable Diffusion WebUI] An article teaches you how to install and use Stable Diffusion WebUI

Stable Diffusion WebUI

1. Installation

1.1 Download stable-diffusion-webui

git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
cd stable-diffusion-webui
# 推荐使用base环境
python3 -m pip install --upgrade pip

1.2 Run webui.sh

bash webui.sh -i https://pypi.tuna.tsinghua.edu.cn/simple

The first time you get stuck is usually in Installing gfpgan, and the second time you get stuck is usually in Installing open_clip.

If you get stuck or get an error, just pip install [package] -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install gfpgan==1.3.8 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install open_clip_torch -i https://pypi.tuna.tsinghua.edu.cn/simple

Then during execution bash webui.sh -i https://pypi.tuna.tsinghua.edu.cn/simple, the above process is repeated until bash webui.sh ends.

If you find that your pip install installation is successful, but it is still stuck, this is because the installed third-party libraries are launch.pyof different versions, and you need to delete all version numbers.

venvIn fact, when stable-diffusion-webui is installed, a folder will be automatically created , which is the environment in which stable-diffusion-webui is run venv.

server:

bash webui.sh

local:
Since the server I am using does not have a visual interface, I need to convert the local port. The command is as follows:

# 在本地打开 cmd 输入
# ssh -L 7860:localhost:7860 <username>@<server_address>
ssh -L 7860:localhost:7860 scholar@10.211.74.61
# 输入密码后,在本地浏览器输入127.0.0.1:7860 即可成功

In the address bar, enter: 127.0.0.1:7860
Insert image description here

CUDA_VISIBLE_DEVICES=2 python webui.py --listen --enable-insecure-extension-access --port 7860 # 只要不是7860即可;加上--enable-insecure-extension-access就可以用URL安装插件

2. Install the plug-in

2.1 Command line installation

Install directly in stable-diffusion-webui/extensionsgit clone.

cd /data_1/ldw_models/stable-diffusion-webui/
git clone https://github.com/toriato/stable-diffusion-webui-wd14-tagger.git extensions/tagger
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui-aesthetic-gradients extensions/aesthetic-gradients
git clone https://github.com/toshiaki1729/stable-diffusion-webui-dataset-tag-editor.git extensions/dataset-tag-editor

2.2 extensions installation

Insert image description here

https://github.com/AUTOMATIC1111/stable-diffusion-webui-aesthetic-gradients 
aesthetic-gradients

https://github.com/toriato/stable-diffusion-webui-wd14-tagger.git 
tagger

https://github.com/opparco/stable-diffusion-webui-two-shot.git

https://github.com/opparco/stable-diffusion-webui-composable-lora.git

2.3 Commonly used plug-ins

Please refer to: https://zhuanlan.zhihu.com/p/579538165?utm_id=0

3. Usage tutorial

https://www.bilibili.com/video/BV1Qc411L7v1/

3.1 Page layout

3.3 Shortcut bar settings

3.3.1 PNG Info

Drag a picture over, the picture information will be automatically generated on the right, and then click to txt2imgto get the same parameters in the txt2img tab.
Insert image description here

3.3.2 Tags

Drag a picture over, and the Tag tag will be automatically generated on the right, which can help us write prompts.

Insert image description here

Guess you like

Origin blog.csdn.net/qq_44824148/article/details/130389357