Nodes/OmniNodes/ControlNet Preprocessor πŸ•ΉοΈ
ComfyUI Node

ControlNet Preprocessor πŸ•ΉοΈ

Canny, lineart, and a 'depth' that's really a guess β€” the zero-download ControlNet preprocessor

By TensorVizionΒ·Created 3 months agoΒ·Updated about 8 hours agoΒ· 0
ControlNet Preprocessor πŸ•ΉοΈ
  • image
  • control_image
  • summary
β—„preprocessorβ–Ύβ–Ί
β—„low_threshold0.10β–Ί
β—„high_threshold0.30β–Ί
β—„invertfalseβ–Ί

ControlNet works off a conditioning image - edges, depth, pose - and getting that image is usually the annoying part. The standard route is a separate comfyui_controlnet_aux install with a pile of model downloads. This node skips all of that: give it a plain IMAGE and it produces a conditioning image in pure PyTorch, no OpenCV, no extra checkpoints, nothing to download. It exists precisely because the pack shipped a ControlNet Loader and realized it had nothing upstream to build the conditioning image from.

Pick preprocessor from three modes:

  • canny - classic Canny-style edge detection: Sobel gradients plus a double threshold. Clean, thin edges, the workhorse for architectural and mechanical subjects. The two threshold widgets, low_threshold and high_threshold (0.1 / 0.3 defaults), tune how much edge noise survives.
  • lineart - a wider, softer Sobel kernel that gives thicker, less noisy lines, closer to a clean line-drawing look. Better for character work.
  • depth_lite - and here's the honest part. This is not a depth model. It estimates near-vs-far from luminance plus a blur-based defocus cue: brighter, sharper regions are treated as "nearer." That works okay for a clear subject against a soft background and nothing else. The pack's own README says it plainly: for anything depth-accuracy-sensitive, use a real MiDaS or Depth Anything preprocessor. This mode is for quick iteration when you don't want to pull a depth model just to test a workflow.

There's also invert (flip the map, occasionally needed for how a specific ControlNet was trained). Every mode outputs a 3-channel control_image - edges/depth replicated across RGB - so it drops straight into any Apply ControlNet node expecting a standard image. The summary STRING output tells you what mode and thresholds ran.

The natural chain is: source image β†’ this node β†’ Apply ControlNet β†’ your positive conditioning, with the pack's ControlNet Loader feeding the CONTROL_NET socket. Canny + depth as a multi-ControlNet combo is the classic structure pass - edges hold the composition while depth keeps the spatial arrangement sane.

Where you get burned: forgetting that depth_lite is a heuristic, not a model, and blaming the ControlNet when the depth map is wrong. Check the summary output - it labels the mode clearly. And be ready to tune the two thresholds for canny; defaults work on clean images, but noisy sources need the low threshold raised or you get a map full of grain that the ControlNet faithfully turns into grain.

If you already have comfyui_controlnet_aux installed, this node is strictly a convenience - the aux pack's preprocessors are more thorough (real depth, pose, the full menu). Reach for this one when you want canny or lineart in one node with zero extra installs, or when you're just prototyping. For the depth family specifically, it's a stopgap.

Install

Part of OmniNodes:

cd ComfyUI/custom_nodes
git clone https://github.com/TensorVizion/OmniNodes

Restart ComfyUI, or install "OmniNodes" via ComfyUI Manager. No extra dependencies - it's pure PyTorch.

Troubleshooting

  • Edges too noisy / too clean - adjust low_threshold/high_threshold, not the ControlNet weight. That's the whole reason they're exposed.
  • Depth looks wrong - it's depth_lite, the heuristic. Use canny or lineart, or install a real depth preprocessor. This is expected behavior, not a bug.
CategoryTensorVizion/Model Utilities

Inputs (5)

NameTypeDefaultDescription
imageIMAGEβ€”
preprocessorCOMBO3 options: canny, depth_lite, lineart
low_thresholdFLOAT0.100–1β€”
high_thresholdFLOAT0.300–1β€”
invertBOOLEANfalseβ€”

Outputs (2)

NameTypeDescription
control_imageIMAGEβ€”
summarySTRINGβ€”