Replicate fofr/controlnet-preprocessors
Run every ControlNet preprocessor at once
- image
- IMAGE
ControlNet needs a preprocessed version of your reference image - a Canny edge map, a depth map, an OpenPose skeleton, a lineart trace - before it can steer generation. This node bundles fofr's all-in-one preprocessor model, which runs a whole batch of those extractors (canny, hed, midas depth, openpose, lineart, normal maps, MLSD, SAM, and more) in a single call. It runs on Replicate's cloud through ComfyUI-Replicate.
Let me be straight with you up front, because it matters for whether you want this: ComfyUI already has excellent local ControlNet preprocessors. The community-standard ControlNet Aux Preprocessors pack runs canny, depth, pose, lineart and the rest right on your machine, for free, in milliseconds, and it's essentially required kit for serious ControlNet work anyway. So a cloud preprocessor is a niche tool: it makes sense if you have no local GPU, or you want one node that fires off every preprocessor at once without wiring a dozen of them.
How it works
The underlying Replicate model takes one image and runs the preprocessors you've toggled on, producing the conditioning maps. You feed those maps into a ControlNet, which conditions generation on that spatial structure. This node sends your image plus the toggles to Replicate and returns an IMAGE.
Inputs and outputs that matter
Required input is an IMAGE. Output is a single IMAGE.
The rest of the inputs are boolean toggles, one per preprocessor, all defaulting to true: canny, hed, midas (depth), open_pose, lineart, lineart_anime, normal_bae, mlsd, pidi, content, face_detector, sam, leres. Turn off the ones you don't want. force_rerun forces a fresh pass on an unchanged image.
The thing to understand: the underlying model naturally produces many outputs (one map per enabled preprocessor), but this node exposes a single IMAGE output - which is the root of the caveat below.
How to install it
ComfyUI Manager: search ComfyUI-Replicate, install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/replicate/comfyui-replicate
cd comfyui-replicate
pip install -r requirements.txt
Restart, and set your token first:
export REPLICATE_API_TOKEN="r8_************"; python main.py
Token: replicate.com/account/api-tokens.
Common issues
Here's the caveat that comes straight from the pack's README: it's built for models returning a simple single text or image output, and warns that a model returning "a combination of outputs" will not work as expected. A preprocessor set that can emit a dozen different maps is exactly the multi-output shape that warning is about. With every toggle on, don't expect to cleanly receive all thirteen maps through one IMAGE output - the safest way to use this node is to enable just the one preprocessor you actually need and take that single result.
Honestly, for most people the right answer is the local ControlNet Aux Preprocessors pack: it's free, instant, gives you each map on its own output, and it's a dependency you'll want for ControlNet work regardless. Reach for this cloud node only when you specifically can't run those locally. And the pack basics apply: a missing REPLICATE_API_TOKEN errors on the first run, and each call bills on Replicate.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| cannyopt | BOOLEAN | true | — |
| contentopt | BOOLEAN | true | — |
| face_detectoropt | BOOLEAN | true | — |
| hedopt | BOOLEAN | true | — |
| midasopt | BOOLEAN | true | — |
| mlsdopt | BOOLEAN | true | — |
| open_poseopt | BOOLEAN | true | — |
| pidiopt | BOOLEAN | true | — |
| normal_baeopt | BOOLEAN | true | — |
| lineartopt | BOOLEAN | true | — |
| lineart_animeopt | BOOLEAN | true | — |
| samopt | BOOLEAN | true | — |
| leresopt | BOOLEAN | true | — |
| force_rerunopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |