Nodes/CRT-Nodes/Smart Preprocessor (CRT)
ComfyUI Node

Smart Preprocessor (CRT)

The preprocessor that skips the work when the ControlNet is off

By PGCRT·Created 2 years ago·Updated 2 months ago· 123
Smart Preprocessor (CRT)
  • image
  • processed_image
preprocessornone
resolution512
controlnet_strength1.00
enable_bypasstrue

Before a ControlNet can steer your sampler, your reference image has to be turned into a condition - edges, depth, pose, whatever the model was trained on. That's the preprocessor's job, and it's genuinely expensive: some of those models are their own little diffusion nets, and running them just to discover the ControlNet strength is zero is a total waste. Smart Preprocessor (CRT) is the one that checks first.

The "smart" is literal: if the ControlNet is going to apply at strength 0, the node returns your image untouched and skips the whole preprocessing pass. When the branch is actually live, it runs a real preprocessor and hands you the condition.

How it works

On load, the node tries to import comfyui_controlnet_aux (the ControlNet Aux pack that hosts all the standard preprocessors). If it finds it, your preprocessor dropdown becomes the full menu - canny, depth, pose, lineart, the works. If Aux isn't installed, you get the fallback set: none and canny, with an OpenCV-based canny so even the fallback is functional.

At run time the logic is:

  1. If enable_bypass is on and controlnet_strength is 0 → return the image as-is (no preprocessor runs).
  2. Otherwise, run the selected preprocessor at your resolution.

That resolution input matters more than people expect: preprocessors run at a fixed internal size, and 512 is the common default. If your canny edges look mushy or your depth map seems to be "out of focus," the resolution is the first thing to check.

Inputs and output

  • image - the source photo/reference.
  • preprocessor - none or canny without Aux; the full menu with it.
  • resolution (64–2048) - processing resolution for the preprocessor.
  • controlnet_strength (0–10) - mirrors the ControlNet's strength so the node can skip work when it's zero.
  • enable_bypass (default on) - the master switch for the skip behavior. Turn it off and it always preprocesses, even at strength 0 (useful when you want to preview the condition while tuning).

Output is a single processed_image - the condition, ready for an apply node like Smart ControlNet Apply (CRT).

The honest advice

Install comfyui_controlnet_aux. The fallback canny is a fine safety net, but the whole point of a preprocessor node is the menu - without Aux, "smart preprocessor" is mostly just a canny with extra steps. The two packs complement each other, and the CRT node was clearly designed with Aux's full catalog in mind.

Other notes:

  • The bypass only kicks in at exactly strength 0. At 0.1 it runs the full preprocessor - so if you're doing a sweep from 0.0, expect the first step to be fast and the rest to be normal.
  • preprocessor at none just passes the image through, which is correct for reference-style conditions.
  • It outputs IMAGE in processed_image; don't feed the raw photo downstream when you meant to feed the processed one.

Install for the pack itself: ComfyUI Manager → search CRT-Nodes → install and restart, or clone into custom_nodes. It's a big suite with heavy dependencies (opencv, ultralytics, librosa, …), and it skips individual nodes on import failure instead of crashing.

CategoryCRT/Image

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
preprocessorCOMBOnone2 options: none, canny
resolutionINT51264–2048
controlnet_strengthFLOAT1.000–10
enable_bypassBOOLEANtrue

Outputs (1)

NameTypeDescription
processed_imageIMAGE