explaingit

mikubill/sd-webui-controlnet

17,871PythonAudience · designerComplexity · 3/5Setup · moderate

TLDR

A plugin for the AUTOMATIC1111 Stable Diffusion web UI that lets you guide image generation with a reference image, a sketch, depth map, or pose, so results match a specific composition rather than being random.

Mindmap

mindmap
  root((repo))
    What it adds
      ControlNet panel
      Preprocessors
      Control image input
    Control modes
      Balanced
      Prompt priority
      ControlNet priority
    Features
      Pixel-Perfect mode
      HiRes fix support
      Upscaler integration
    Use cases
      Pose matching
      Sketch to image
      Consistent layouts
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Guide AI image generation to reproduce a specific pose from a reference photo without modifying or merging any base model.

USE CASE 2

Turn a rough pencil sketch into a detailed illustration by feeding it as a ControlNet control image instead of relying on a text prompt alone.

USE CASE 3

Generate consistent character layouts or product compositions across many images by reusing the same depth map or lineart as the control signal.

Tech stack

PythonStable DiffusionControlNetAUTOMATIC1111

Getting it running

Difficulty · moderate Time to first run · 30min

Requires AUTOMATIC1111 Stable Diffusion web UI already installed, plus ControlNet model files downloaded separately into the extension's models folder.

In plain English

This project is an extension for AUTOMATIC1111's Stable Diffusion web UI that plugs ControlNet, and other injection-based controls, into the image-generation workflow. Stable Diffusion on its own takes a text prompt and produces an image, but you have limited say over composition, pose, depth, or layout. ControlNet lets you guide generation with an extra input image, like a sketch or a depth map, so the result follows that shape. This extension brings that capability directly into the web UI as an on-the-fly addition that does not require merging anything into the base model. You install it from inside the web UI by pasting its git URL into the Install from URL tab, restarting the UI, then downloading the ControlNet models into the extension's models folder. Once loaded, ControlNet appears as a panel where you pick a model and a preprocessor, feed in a control image, and the extension handles the rest. It supports a Pixel-Perfect mode that picks the preprocessor resolution automatically, integrates with the web UI's high-resolution fix by producing both a small and a large control image, and works with the different img2img and inpainting mask types. Control Modes let you bias generation toward your prompt or toward the control image, and there is support for upscaling scripts such as Ultimate SD upscale and Tiled VAE/Diffusion. People reach for this when they want repeatable, controllable image generation rather than the lottery of pure text-to-image. It is built in Python for the AUTOMATIC1111 web UI environment, and the README's news section lists ongoing additions like Depth Anything V2, IP-Adapter features, and a ControlNet union model.

Copy-paste prompts

Prompt 1
I installed sd-webui-controlnet. Walk me through downloading a ControlNet model, loading a reference pose image, and generating a portrait that matches that pose.
Prompt 2
I have a rough pencil sketch. Which ControlNet preprocessor and model should I use to turn it into a detailed illustration with Stable Diffusion?
Prompt 3
Explain ControlNet's Control Modes, Balanced, My prompt is more important, ControlNet is more important, and when I should use each one for product photography.
Prompt 4
How does Pixel-Perfect mode in sd-webui-controlnet work, and when should I enable it instead of setting the preprocessor resolution manually?
Open on GitHub → Explain another repo

← mikubill on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.