Mikubill / sd-webui-controlnet
- пятница, 17 февраля 2023 г. в 00:13:34
WebUI extension for ControlNet
(WIP) WebUI extension for ControlNet
This extension is for AUTOMATIC1111's Stable Diffusion web UI, allows the Web UI to add ControlNet to the original Stable Diffusion model to generate images. The addition is on-the-fly, the merging is not required.
ControlNet is a neural network structure to control diffusion models by adding extra conditions.
Thanks & Inspired: kohya-ss/sd-webui-additional-networks
scripts/cldm.py
)scripts/processor.py
. Change it if needed.Some users may need to install the cv2 library before using it: pip install opencv-python
.pt
, .pth
, .ckpt
or .safetensors
) inside the sd-webui-controlnet/models
folder.Currently it supports both full models and trimmed models. Use extract_controlnet.py
to extract controlnet from original .pth
file.
Pretrained Models: https://huggingface.co/lllyasviel/ControlNet/tree/main/models
Two methods can be used to reduce the model's filesize:
Directly extract controlnet from original .pth file using extract_controlnet.py
.
Transfer control from original checkpoint by making difference using extract_controlnet_diff.py
.
All type of models can be correctly recognized and loaded. The results of different extraction methods are discussed in lllyasviel/ControlNet#12 and #73.
Pre-extracted model: https://huggingface.co/webui/ControlNet-modules-safetensors
Pre-extracted difference model: https://huggingface.co/kohya-ss/ControlNet-diff-modules
Source | Input | Output |
---|---|---|
(no preprocessor) | ![]() |
![]() |
(no preprocessor) | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
--xformers
enabled, and Low VRAM
mode ticked in the UI, goes up to 768x832