Generative AI Advanced

ControlNet

A device that pins an image's shape down with a rough sketch

Key points
  • ControlNet is a device that specifies shape with a picture when generating an image. It hands over composition and pose that are hard to put into words, as a rough sketch instead.
  • Text alone gets the color and mood right, but where anything ends up sitting shifts every time you generate. ControlNet pins that down.
  • Sketches come in several kinds — outlines, skeleton lines, near-and-far maps, color blocks — and which one gets picked decides what gets pinned down.
  • The original model stays locked, with just one side branch trained on top. That's why sketch types can be swapped in and out like plug-ins.
  • How tightly it grips is adjustable. Grip it hard and the sketch rules; loosen it and the image wanders free.
Contents

1The analogy

Picture a single straight crease running down the front of a pair of pants. Press it once with an iron, and that line becomes wherever the fabric folds. The color of the cloth, the pattern, the thickness — none of it changes. The only thing decided is where the fold happens.

Press hard and long, and the crease stands knife-sharp, folding at that exact spot no matter how you move. Barely graze it with the iron, and the crease stays soft, drifting a little with every step. What gets creased doesn't have to be just one thing either — you could press along the outer seam, or hold just a single line down the center.

ControlNet is pressing this same kind of crease into an image before it's generated. Color, material, and mood get ordered with words; what ends up sitting where gets decided by the crease that's already pressed in.

2In detail

Words struggle to pin down position

A prompt works well for deciding what gets drawn. But a request like "light coming from the left, the window frame crossing the upper-right third of the frame, the chair tilted slightly" gets mangled the instant it's turned into a sentence. Type the same sentence in ten times, and ten different layouts come out.

Fixing the seed does bring the same image back. But that pins down one specific image, not the composition itself. Change even a single word in the prompt, and the whole layout scatters again.

ControlNet doesn't try to solve this with words. It hands over the desired layout drawn as lines, directly. The prompt stays a prompt, and position gets decided by the lines instead.

What gets handed over is one layer of lines, not a picture

What gets handed over isn't a finished picture. It's an image that keeps only one layer of information — an outline drawing with just the edges pulled from a photo, a skeleton made of joint positions strung together, or a depth map that marks how far away each spot in the frame is using brightness.

There's a reason for keeping only one layer. Feed in a whole reference photo, and its color and material tag along too, wiping out any room for the model to generate something new. Keep only the edges, and shape holds while the slots for color and texture stay empty — and the prompt fills those slots in. It's the same as how ironing pins down one crease, not the whole cloth.

There's no need to draw the sketch by hand either. Separate tools exist that pull an outline or a skeleton out of a single reference photo, and their output can be used as-is. Of course, drawing the lines in yourself works too.

The original stays put, and only lines get added

ControlNet doesn't build a new image-generation model. It leaves the already-trained model completely untouched and locked, sets a copy of the same shape beside it, and trains only that copy. The copy learns to read the sketch and turn it into a signal that says "there's a line right here."

The signal the copy produces gets added in at every step where the original model refines the image. At first this signal is held down so it has no effect at all, and as training goes on, it gets opened up gradually to start pulling its own weight. It's the same as adding just the fold, without ever touching the weave of the fabric.

This structure means a separate side branch can be built for each kind of sketch and swapped in whenever it's needed.

How hard, and how far, to grip

How closely the sketch gets followed is set by a single dial. Grip it hard, and the image doesn't stray an inch from the lines, but it turns stiff and whatever's outside the lines comes out thin. Loosen the grip, and the image turns natural again, at the cost of the composition drifting a little. It's the same difference as pressing the iron down long versus barely grazing it.

When to grip and when to let go can also be set. An image starts as a blurry mass and sharpens over several stages, with the broad layout settled in the early stages and fine detail settled in the later ones. So gripping only the early stages and releasing the later ones keeps the composition while letting the fine detail come out freely.

Choosing what to pin down

Pull different kinds of sketches from the same photo, and the results diverge sharply. Use the outline, and the original's silhouette survives almost intact; use only the skeleton, and just the pose matches while everything else is generated completely fresh. Use only the depth map, and only the spatial layout survives, with the prompt deciding what actually occupies it.

So the order that works is deciding what to keep and what to change first, then picking the kind of sketch to match. Pin down too much, and there's no room left to generate anything new; pin down too little, and there was no point pinning anything down at all.

3More precisely

ControlNet is a structure that attaches one more conditioning input to an image-generation model. The trained model's values stay fixed, while a copy made from an early portion of it takes in the sketch, turns it into features, and adds the result in at every intermediate stage of the original model. The connection linking the copy to the original starts out passing nothing through at all, so it doesn't damage the original's performance early in training. Because the signal is added on top rather than swapped in, several side branches can run on the same locked model at once, each contributing its own hint.

The ironing analogy breaks down in places. A pressed crease is a physical force that only ever folds at that one spot, but ControlNet isn't a hard enforcement — it's a hint added in at every stage. That's why lowering the strength lets the image cross the line, and why a prompt and a sketch that disagree with each other can produce an image that's half-committed to both. There's also a difference in who decides the lines: a person picks a crease by eye, while a sketch is usually pulled automatically from a reference image.

4Try it yourself

5Common misconceptions

  • It's easy to think feeding in a sketch just colors it in, but actually the image gets generated fresh from scratch, with only its shape pulled toward the sketch.

  • It's easy to think using ControlNet retrains the model, but actually the original model stays locked exactly as it was, and only the side branch attached to it gets trained.

  • It's easy to think a more detailed sketch always gives a better result, but actually lines packed too tightly leave no room to generate anything new, producing a stiff, awkward image.

7One-line summary

In shortControlNet is like pressing the fold line into an image before it's generated, so color and mood get ordered in words while shape gets pinned down by the line already pressed in.

Spotted an error or have a better analogy? Suggest an edit · Last updated2026-09-02