ComfyUI Node

ControlNet Preprocess Depth

The Preprocessor That Sits Before Your ControlNet

By Runware·Created 2 years ago·Updated about a month ago· 140
ControlNet Preprocess Depth
  • image
  • image
ttlfalse
ttl_value60
outputFormatJPG

ControlNet can't condition on a plain photo - it conditions on a map extracted from one. Depth is the map that encodes spatial layout: closer things bright, farther things dark. Runware_controlnet_preprocess_depth runs that extraction on Runware's cloud, no local MiDaS/Depth Anything weights to download, no VRAM to spare. Feed it an image, it returns a depth map as an IMAGE, and you wire that into RunwareBuild_controlNet's guideImage input so your generation respects the scene's structure instead of ignoring it.

How it works

The image goes up, Runware's depth estimator runs, and the grayscale-ish depth map comes back. Which estimator is under the hood isn't exposed - you don't get a MiDaS-vs-ZoeDepth-vs-Depth-Anything picker; it's "the vendor's depth preprocessor," and that's the trade. Locally you'd argue about estimator quality; here you just get a map and pay a fraction of a cent. What the map is for is unchanged from the local world: a ControlNet depth condition tells the model where objects sit in 3D space, so foreground stays foreground and composition survives the generation.

The inputs

Thin node, and that's a feature:

  • image (required) - the source image to extract depth from.
  • outputFormat (JPG/PNG/WEBP) and ttl (toggle + value) - delivery details. JPG is fine for a depth map; you're not printing this.

Output is image - the depth map itself. Preview it before you spend credits on the generation; a bad depth map (flat, noisy, washed out) is a sign to fix the source image first, and previewing the map costs you nothing.

Wiring it up

The canonical chain: this node → RunwareBuild_controlNet (guideImage input) → the controlNet socket on an image model. On the builder, weight is where you tune how hard the depth condition grips the output, and the start/end step fields control when the condition applies - release it partway through and the model adds its own detail in the later steps, which the KB flags as the standing community advice for structure-heavy work.

Install and setup

Standard for this pack: ComfyUI Manager → "Runware" → install → restart, or clone and pip install -r ComfyUI-Runware/requirements.txt (runware-sdk, pillow, soundfile). API key via Settings → Runware API key, RUNWARE_API_KEY, or runware auth login. Preprocessing is cheap - well under a cent per map - but the ~$20 minimum top-up with a card on file is the standing friction before your first run.

Troubleshooting

  • Map looks wrong - depth estimators read contrast and structure; a confusing source image (busy background, bad lighting) yields a confusing map. Preview and fix the source.
  • Generation ignores the depth - that's a builder setting, not this node: raise weight in RunwareBuild_controlNet, and make sure the preprocessor output actually feeds its guideImage input, not the model node directly.
  • Not every model takes depth ControlNet - the builder's model dropdown lists the ControlNet models Runware hosts; match the preprocessor type to the ControlNet model.

It's one step in a three-node chain, but it's the step that turns "describe a scene" into "recreate this scene's layout." If you're doing architecture, interiors, or any composition that must not drift, this is the preprocessor you want.

CategoryRunware/Image/runware

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
ttloptBOOLEANfalseEnable to set ttl. Off uses the model's default.
ttl_valueoptINT60Time-to-live (TTL) in seconds for generated content. Only applies when `outputType` is `URL`.
outputFormatoptCOMBOJPGFile format for the generated image.

Outputs (1)

NameTypeDescription
imageIMAGE