What is a Preprocessor?

How do you prepare the "control images" ControlNet uses, like stick figures and depth maps? Simple edges like Canny might be doable, but drawing a depth map by hand every time just isn't realistic.

So in the ControlNet world, the processes that automatically create stick figures, depth maps, line art, normal maps, and so on from a reference image are lumped together, for convenience, as "Preprocessors."

There isn't one technology that does all of this. Pose estimation, depth estimation, line art extraction, and the rest are each separate technologies.


The True Nature of Control Images

I said drawing them by hand is hard, but keep in mind that you can draw them by hand.

A control image isn't a special data type. It's just an RGB image. Feel free to paint out unwanted parts of a depth map in black, or redraw just the arms in a pose image to change the pose.


Required Custom Nodes

Basically, this is all you need.


Frequently Used Preprocessors

Here are the ones that actually get used a lot. There are better-performing options, but I picked these for being easy, lightweight, and simple to use.

For ControlNet, you don't need extreme accuracy anyway.

WorkflowsFrequently Used Preprocessors
canny_canny_edge.json

Canny

  • 🟩 Canny
  • 🟨 Canny Edgy
hed_soft_edge.json

SoftEdge / HED

  • 🟩 HED Soft-Edge
realistic_anyline_lineart.json

Lineart

  • 🟩 Realistic Lineart
  • 🟨 AnyLine Lineart
depth_anything_v2.json

Depth

  • 🟩 Depth Anything V2
    • It's up to V3 now, but V2 is plenty for ControlNet.
dsine.json

Normal

  • 🟩 DSINE
m_lsd.json

MLSD

  • 🟩 M-LSD Lines
openpose_dwpose.json

Pose

  • 🟩 OpenPose
  • 🟨 DWPose
    • It's often treated as a straight upgrade over OpenPose, but it has one clear weakness: it struggles with people seen from behind. Use it alongside OpenPose depending on the situation.
sdpose.json

SDPose

judian17/ComfyUI-SDPose-OOD

  • 🟩 SDPose
    • OpenPose is really bad with animals and anime illustrations, so try this one when it doesn't work.