Skip to main content

๐ŸŸขย  ControlNet

ControlNet is a plugin for Stable Diffusion that allows the incorporation of a predefined shape into the initial image, which AI then completes.

Plugin Installationโ€‹

For Windows users who followed the installation and deployment section, the plugin is already included in the downloaded package, so no manual installation is necessary. Others can install the sd-webui-controlnet plugin from the extensions section.

Model Installationโ€‹

In addition to the plugin, the ControlNet model needs to be downloaded from the following links:

https://huggingface.co/webui/ControlNet-modules-safetensors/tree/main

https://huggingface.co/lllyasviel/ControlNet/tree/main/models

Place the downloaded models in the following path:

For some versions, place the applications in the /extensions/sd-webui-controlnet/models directory.

Model Overviewโ€‹

ModelEffect
CannyUses algorithms to intricately capture the edges of the image as references for generation.
mlsdAttempts to capture prominent straight lines in the image for reference.
hedAttempts to capture image features for reference.
ScribblesUses provided lines as structural references for generating images.
openposeGenerates a skeleton from the human figures in the image for reference.
segReplaces the image with broad color blocks for reference.
depthTries to capture the depth and distance within the image for reference.
normalSimilar to depth, tries to capture the depth and distance within the image for reference.

Examplesโ€‹

For instance, using Canny for coloring line art:

Enter the prompt words, select the main model, sampler, and adjust the height as needed.

Then click on the ControlNet module, upload your line art, check the enable box and invert input colors (since our image has a white background), adjust the canvas height accordingly. If your GPU performance is limited, consider selecting the low memory mode.

Then click generate, and the result is as shown:

Another example is using openpose, a feature that generates images based on skeletons:

We select the openpose model in ControlNet and click generate.