How to Install ControlNet Extension in Stable Diffusion (A1111)

Updated
How to Install ControlNet Extension in Stable Diffusion (A1111)
Learn how to install ControlNet and models for stable diffusion in Automatic 1111's Web UI. This step-by-step guide covers the installation of ControlNet, downloading pre-trained models, pairing models with pre-processors and more. Achieve better control over your diffusion models and generate high-quality outputs with ControlNet.

1. Introduction

In this blog post, we will explore the process of installing ControlNet for Stable Diffusion (A1111). ControlNet is a neural network interface structure that enhances the control over stable diffusion models by adding additional constraints. It allows you to generate better and more controlled outputs. We'll provide a step-by-step guide to help you through the installation process.

2. Installing the ControlNet Extension

To install the ControlNet extension, open the web UI interface and follow these steps:

  • Navigate to the "Extensions" tab.
  • Click on "Install from URL" and
  • Paste the Git URL: https://github.com/Mikubill/sd-webui-controlnet install_controlnet_stablediffusion_nextdiffusion_github.png
  • Click "Install"
  • Once done, Click on "Apply and restart UI" or Close Stable Diffusion web UI and restart it.

When successfully installed, you should be able to see the ControlNet expansion panel in both the 'txt2img' and 'img2img' tabs. It should look like this when the expansion panel is expanded: full_controlnet_expansion_panel_expanded.png

Stable Diffusion in the Cloud⚡️Run Automatic1111 in your browser in under 90 seconds
20% bonus on first deposit

3. Download Pre-Trained ControlNet Models

With the ControlNet extension installed, we need to download the pre-trained models. The original pre trained models can be found on the huggingface website.

Make sure to download at least one model (file ending with .pth), but it's suggested to have all ControlNet models installed. Once downloaded, place the models in following folder location: "extensions/sd-web-ui/ControlNet/models" within the Stable Diffusion folder. Example below: controlnet_models_filepath.png

You also have the option to download the .safetensors pre-trained models, which consume less storage space.

4. Pairing Models with Pre-Processors

Each model needs to be paired with the appropriate pre-processor. For example, if you're using the canny preprocessor, pair it with the original or pre-trained canny model. Example: canny_preprocessor_model_combination.png

The same goes for depth, HED, mlsd, normal map, open pose, scribble, and segmentation models. Ensure that the correct combination is selected. Although the specific use of ControlNet is beyond the scope of this blog post, successfully installing it is the primary focus.

Stable Diffusion in the Cloud⚡️Run Automatic1111 in your browser in under 90 seconds

5. ControlNet Error Handling

Some users may encounter errors related to Gradio when generating images with Control Net. To resolve this issue, upgrade the Gradio version to 3.16.2. You can do this by opening the command line within the Stable Diffusion folder. On Windows, right-click and select "Open in Terminal." Then, enter the command pip install gradio==3.16.2 to initiate the installation. pip_install_gradio.png

6. Conclusion

Congratulations! You have successfully installed Control Net for Automatic 1111's Web UI in Stable Diffusion. By following this comprehensive guide, you now have the necessary tools and knowledge to enhance your control over diffusion models and generate better, more controlled outputs.

character creation tool card

AI Image Generation Tool

Create Your AI Images in Seconds!

News & Updates