ComfyUI Node

modaux: zoe

Zoe gives you depth — MiDaS just might be sharper

By madtunebk·Created 2 years ago·Updated 2 years ago· 17
modaux: zoe
  • image
  • IMAGE
detect_resolution512
image_resolution512

Depth maps are the ControlNet condition that makes a redraw understand space: near things stay near, far things stay far, and the scene keeps its geometry no matter how hard the prompt pushes the style. modaux: zoe is this pack's depth-estimation node, powered by Microsoft's ZoeDepth - and it comes with a caveat the community has been repeating since 2023: for ControlNet work, MiDaS usually does the job sharper.

It's still the right tool sometimes, and it's the depth node to know about either way.

How it works

The node wraps ZoeDetector from Hugging Face's controlnet_aux, downloading the ZoeD_M12_N.pt checkpoint from lllyasviel/Annotators on first run. ZoeDepth's distinguishing trait is that it's a metric depth estimator: trained on NYU (indoor) and KITTI (driving) data, it predicts real distances rather than just "closer than / farther than." It converts your image into a grayscale map where white is close and black is far.

Here's the honest part, and it's the canonical community finding on this exact question. When ZoeDepth came out, someone ran a direct A/B test against MiDaS for ControlNet work and the verdict was blunt: use MiDaS. The reason is edge sharpness. ZoeDepth is theoretically more accurate - it can quote you distances in meters - but its maps come out softer, and for a depth ControlNet, crisp edges between objects are worth more than metric correctness. The model holds detail better when the map has clean boundaries.

So: if your pipeline actually needs metric depth (measurement, photogrammetry, robotics-adjacent tinkering), this node is a decent way to get it. If you're conditioning a generation, run the sibling modaux: midas node in the same pack instead - or skip both for the current-generation favorite, Depth Anything, which this pack doesn't ship.

Inputs and wiring

Like the other simple nodes in the pack, there are no optional inputs: image, plus detect_resolution and image_resolution (both default 512). Detection runs at detect_resolution, output is resized to image_resolution, and a single IMAGE depth map comes out. It plugs into any depth ControlNet - control_v11f1p_sd15_depth on SD 1.5, or the "depth" condition of the SDXL and newer union models. Depth is the strongest condition on most Flux-era unions, so if you're generating with one of those, this map feeds it directly.

Installing it

ComfyUI Manager: search ControlNetAux (repo madtunebk/ComfyUI-ControlnetAux), or:

cd ComfyUI/custom_nodes
git clone https://github.com/madtunebk/ComfyUI-ControlnetAux
cd ComfyUI-ControlnetAux
pip install -r requirements.txt   # timm, controlnet-aux==0.0.7, mediapipe

Restart ComfyUI, and it shows up as modaux: zoe under ControlNet Auxiliar.

Where people get burned

Same pack-level traps as the rest: this is the small beta "ControlNet Auxiliar" pack by madtunebk, not Fannovel16's comfyui_controlnet_aux (which is what AIO_Prep workflows want), and the README's one-line description - it calls Zoe "depth super-resolution" - is not what this node does. First run downloads the checkpoint, so expect a delay.

And the depth-specific tip: if your depth map comes out mushy around object boundaries, don't reach for the resolution sliders first - try the MiDaS node in the same pack, or a newer depth estimator entirely. Zoe is the theoretically-correct choice; it's just rarely the better one for a ControlNet, and it's worth having the comparison in your back pocket before you build a whole workflow around it.

CategoryControlNet Auxiliar

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
detect_resolutionINT512256–1024
image_resolutionINT512256–1024

Outputs (1)

NameTypeDescription
IMAGEIMAGE