Stable Diffusion WebUI + ControlNet Guide to Pose Replication
This article takes Stable Diffusion WebUI (AUTOMATIC1111) Version: v1.10.1 as an example to introduce how to install and use ControlNet to achieve pose replication effects.
Rendering...
This article uses Stable Diffusion WebUI (AUTOMATIC1111) Version: v1.10.1 as an example to introduce how to install and use ControlNet for pose replication.
## Installing the ControlNet Extension
To use ControlNet functionality, you need to install the corresponding plugin first. Here's the simplest plugin installation method for `sd-webui-controlnet`:
1. Open the `Extensions` tab. In the `Installed` sub-tab, you can see many installed plugins. If `sd-webui-controlnet` is not present, you haven't installed it yet.
2. Click to open the `Available` sub-tab, then click the `Load from` button to load available plugins.
3. After successful loading, enter `sd-webui-controlnet` in the search input box. You should see the plugin, which has over 17,000 stars. Be sure to identify it correctly. Click `Install` to begin the installation (Chinese users, please ensure a stable international internet connection during installation).
4. After installation, restart the service. You should then see the `ControlNet v1.1.xxx` tab in the `text2img`, `img2img`, and other tabs.
In addition to the automatic installation method described above, you can also install it manually. Go to the plugin's GitHub repository: https://github.com/Mikubill/sd-webui-controlnet, and manually clone the repository into the WebUI's `extensions` folder. The folder name should be the repository name, for example, `extensions/sd-webui-controlnet`. After manual cloning, restart the WebUI.
## Downloading Models
After installing the plugin itself, ControlNet is just an "empty shell." It requires core model files (usually with `.pth` or `.safetensors` extensions) and corresponding configuration files (`.yaml` extensions) to function.
Since Stable Diffusion has two mainstream underlying large model architectures, **SD 1.5** and **SDXL**, you **must strictly match** when downloading ControlNet models. Otherwise, the backend will report an incompatibility error on startup (`Exception: ControlNet model ... is not compatible with sd model`).
### 1. Determine Your Download Version
- **If you are using the SD 1.5 anime large model**: Go to Hugging Face's [lllyasviel/ControlNet-v1-1](https://huggingface.co/lllyasviel/ControlNet-v1-1) repository and download `control_v11p_sd15_openpose.pth` and the `.yaml` file with the same name.
- **If you are using the SDXL anime large model**: Go to Hugging Face's [thibaud/controlnet-openpose-sdxl-1.0](https://huggingface.co/thibaud/controlnet-openpose-sdxl-1.0) repository and download `OpenPoseXL2.safetensors` (or `controlnet-openpose-sdxl-1.0.safetensors`), and download the `config.json` configuration file. *(Note: SDXL models are larger in size, which is normal).*
### 2. Model Storage Path
Place the downloaded `.pth` / `.safetensors` model files and configuration files into the following path: `Your WebUI Installation Directory/webui/models/ControlNet/`
After placing the files, return to the WebUI interface. Next to the Model dropdown menu in the ControlNet panel, click the **blue refresh icon 🔄** to recognize them. There's no need to restart the entire WebUI service.
## Parameter Configuration
To illustrate, let's take the example of converting a real person's photo pose to an anime image. We need to expand the **`ControlNet v1.1.xxx`** tab under the **`img2img` (Image to Image)** panel and configure the following core parameters:
1. **Basic Enablement Settings**:
* Check **`Enable`**.
* Check **`Pixel Perfect`** (Pixel Perfect mode. This allows ControlNet to automatically adjust calculation precision based on image resolution, greatly improving pose capture accuracy).
2. **Control Type Selection**:
* Click **`OpenPose`** in the `Control Type` radio buttons. The preprocessor and model below will be automatically filtered.
3. **Preprocessor (Preprocessor) and Model Pairing**:
* **Preprocessor**: It is highly recommended to select **`dw_openpose_full`** or `openpose_full`. These two preprocessors are currently the algorithms with the highest recognition rates, capable of accurately capturing full-body joints, facial expressions, and finger poses simultaneously.
* **Model**: Select the OpenPose model you downloaded in the previous step that matches the SD main large model version in the top-left corner (select `v11p_sd15_openpose` for SD 1.5, and `OpenPoseXL2` for SDXL).
4. **Control Mode and Weight**:
* **Control Weight**: Defaults to `1`. If you find that the generated anime image's large model has "too much of its own idea" causing pose distortion, you can increase the weight to **`1.4 - 1.6`**.
* **Control Mode**: Defaults to `Balanced`. If the pose restoration is still not ideal, you can check **`ControlNet is more important`** to force the large model to adhere to the pose skeleton.
## Generating Images and Troubleshooting
After configuring the parameters, add anime style keywords to the positive prompt (e.g., `masterpiece, best quality, vibrant anime style, 2D`) and `realistic, photographic` to the negative prompt. Then, click **`Generate`** to start generating.
In the new version of the WebUI's ControlNet interface, you no longer need to find the "explosion icon" to generate the skeleton beforehand. After clicking `Generate`, ControlNet will run automatically in the background. Once generation is complete, the results display area on the right will not only output the converted anime image but also include a **black background with a colored skeleton image** (OpenPose skeleton image).
**Tip: The output effect is also highly correlated with the main model. It is recommended to choose the latest models, such as `plantMilk` and `waiIllustrious` in the anime domain.**Comments
Please login to view and post comments
Go to Login