TdxhControlNetProcessor
Resize and preprocess for ControlNet in one node
- image
- IMAGE
TdxhControlNetProcessor is the prep half of the ControlNet pipeline. A ControlNet doesn't want your raw photo - it wants a clean spatial map (edges, depth, pose), and it wants it at a resolution that matches your latent. This node does both jobs in one: resize the image, then optionally run a preprocessor, all behind a bool_int switch.
The resize part is stock ImageScale logic: upscale_method (nearest-exact, bilinear, area, bicubic, lanczos), width, height, and crop (disabled or center). The preprocessor part is where it gets interesting. The preprocessor dropdown lists "Invert" and "None" plus - if you have comfyui_controlnet_aux installed in custom_nodes - its entire all-in-one preprocessor menu: canny, depth, openpose, lineart, MLSD, and the rest. When bool_int is 0, the image passes through untouched; when it's on, you get resized, optionally-preprocessed pixels out as an IMAGE, ready to feed into a ControlNet apply node.
Here's the trap, and it's a real one: if comfyui_controlnet_aux is not installed, the dropdown silently degrades to just Invert and None, and the node returns the resized image with no error. You'll wonder why your "depth map" is just your source photo. There's no warning banner - the README mentions the aux dependency, but the code won't tell you. So: install comfyui_controlnet_aux (via Manager) or expect only resizing.
Two more things worth knowing. Preprocessors aren't free: several download their own small models on first use (controlnet_aux handles that) and some are slow on big images. And the whole "preprocess at the node level" pattern here mirrors what controlnet_aux's own all-in-one node does - this node is essentially a thin wrapper that adds the resize step and the switch, which is handy if you want one consistent prep node per ControlNet rather than a preprocessor + separate resize node.
Installing it
ComfyUI Manager → search tdxh_node_comfyui → install → restart, plus install comfyui_controlnet_aux the same way. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/youyegit/tdxh_node_comfyui
git clone https://github.com/Fannovel16/comfyui_controlnet_aux
Restart and it's under TDXH → tdxh_efficiency. Hobbyist pack, GPL-3.0; the README warns nodes can change between versions.
The honest take
If you're already using controlnet_aux's own all-in-one preprocessor, this node's extra value is the resize step and the switch - real, but modest. If you were looking for one node that resizes and preprocesses, this is exactly it. Just don't skip the aux dependency and then wonder why nothing looks preprocessed.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| bool_int | INT | 10–1 | — |
| image | IMAGE | — | |
| upscale_method | COMBO | 5 options: nearest-exact, bilinear, area, bicubic, lanczos | |
| width | INT | 5121–16384 | — |
| height | INT | 5121–16384 | — |
| crop | COMBO | 2 options: disabled, center | |
| preprocessor | COMBO | None | 2 options: Invert, None |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |