Zoe Depth Anything
Zoe's structure with a Depth Anything brain
- image
- IMAGE
This is a hybrid: it's the ZoeDepth metric-depth architecture, but with its image encoder swapped out for Depth Anything's - as the pack README puts it, "basically Zoe but the encoder is replaced with DepthAnything." You get Zoe's metric-depth output (real-world scale, indoor/outdoor tuned) riding on the much stronger Depth Anything backbone, which generalizes better than the original Zoe encoder. It produces a grayscale depth map for a depth ControlNet like the other depth nodes, and it's the specialist pick for when you specifically want metric depth with modern quality.
How it works, and when metric depth is the point
Plain ZoeDepth was one of the first metric depth estimators - it predicts distances in real-world units, trained separately on indoor and outdoor data. Its weakness was the encoder: it didn't generalize as well as the newer Depth Anything, which was trained on 62 million images. This node grafts the two together - Depth Anything's robust feature extraction, Zoe's metric depth head - so you get scale-aware depth that holds up on scenes the original Zoe would have struggled with.
Now, the honest caveat the knowledge base has hammered for years: metric depth is usually worse for ControlNet than plain relative depth, because the metric head's smoother gradients give the ControlNet softer edges to follow. So for standard "lock the composition" conditioning, the relative Depth Anything V2 node is still the better default. Where this hybrid earns its place is when a downstream step genuinely wants metric, scene-consistent depth - some parallax, VR, and 3D-geometry pipelines care about real distances - and you want that with better generalization than legacy Zoe.
The inputs and output
environment(defaultindoor) - pick the metric model tuned for your scene.indoorfor interiors and close subjects,outdoorfor landscapes and distant scenes. This isn't cosmetic - the two are trained on different distance ranges, and choosing wrong compresses your depth range. Match it to the actual content.resolution(default 512) - working size; match your render.
The single output is an IMAGE (the depth map) that feeds a ControlNet Apply node with a depth ControlNet. The node makes the hint; the ControlNet model is separate.
Installing it
ComfyUI Manager: search ComfyUI's ControlNet Auxiliary Preprocessors, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Fannovel16/comfyui_controlnet_aux
pip install -r requirements.txt
Restart ComfyUI. The metric Depth-Anything weight (indoor or outdoor) downloads from HuggingFace on first run.
Where people get burned
First, set environment correctly - an indoor model on an outdoor landscape (or vice versa) gives you a flattened, wrong-scaled depth map, and it's the most common reason someone's result looks off. Second, don't reach for this expecting it to beat the relative Depth Anything V2 node for plain ControlNet conditioning - for most "keep the layout" work, relative depth's sharper edges win, and this hybrid's metric smoothness can actually condition worse. Choose it deliberately, for metric-depth needs, not as a default. Third, the universal one: the depth map does nothing without a depth ControlNet loaded and wired in. If you just want good depth conditioning and aren't sure you need metric, use DepthAnythingV2Preprocessor instead and come back to this hybrid only when a workflow specifically calls for scaled depth.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| environmentopt | COMBO | indoor | 2 options: indoor, outdoor |
| resolutionopt | INT | 51264–16384 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |