Depth Anything V2
Turn any image into a depth map
- da_model
- images
- image
This is the node that actually does the work: feed it an image, get back a grayscale depth map - white is close to the camera, black is far. No stereo rig, no lidar, no special capture setup, just one ordinary photo in. It's the current default depth ControlNet preprocessor in the ComfyUI ecosystem, and has been since 2024; nothing has displaced it since, which for this space counts as a strong endorsement.
Why you'd reach for it
Depth maps do double duty. Feed one into a depth ControlNet and you can redraw a scene in a totally different style while keeping the same spatial layout - same foreground/background relationships, different everything else. Or use the raw map for stuff that has nothing to do with generation: parallax "living photo" effects, stereo/VR conversion, even 3D-printable height fields. Depth Anything V2 became the standard preprocessor for the ControlNet side because of one specific finding the community landed on the hard way: models that predict metric (real-world, in-meters) depth tend to produce softer, less-defined edges, and softer edges are worse for ControlNet conditioning than plain relative depth with sharp contrast. This node gives you the sharp, relative kind by default - the kind ControlNet actually wants.
How it works
Under the hood it's a monocular depth estimation model - trained on tens of millions of images (mostly unlabeled internet photos, pseudo-labeled semi-supervised) to generalize to almost any scene without needing per-domain fine-tuning. It runs a single forward pass per image: no denoising loop, no multi-step process, just image in, depth map out. That's why it's fast compared to alternatives like Marigold, which frames depth as a diffusion process and pays for it in speed.
The inputs and outputs that matter
There are exactly two required inputs, and that's genuinely all you need to set:
da_model(DAMODEL) - the loaded model, which comes from the companionDownloadAndLoadDepthAnythingV2Modelnode. You can't skip this step or feed in a generic checkpoint; this pack uses its own model type.images(IMAGE) - whatever you want depth-mapped. A photo fromLoadImage, a frame from a video batch, an already-generated image from earlier in your graph - anything that's anIMAGE.
One output: image (IMAGE) - the depth map itself. Wire it into a ControlNet's image input (via your usual ControlNet apply node) if you're conditioning a new generation, or straight into SaveImage/PreviewImage if you just want the map itself - for parallax, VR conversion, or feeding into a 3D tool downstream.
How to install it
ComfyUI Manager is the easy path: search "ComfyUI-DepthAnythingV2", install, restart. Manual install:
cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-DepthAnythingV2
then restart ComfyUI. This node itself needs nothing extra to download - all the weight-fetching happens over on the loader node the first time you run it, straight into ComfyUI/models/depthanything.
Common issues & troubleshooting
Nothing happens / graph errors about a missing model. You need DownloadAndLoadDepthAnythingV2Model upstream, feeding its da_v2_model output into this node's da_model input. This node has no way to load a model on its own - that's a deliberate split so you're not re-loading weights every run.
Depth map is muddy or lacks contrast. Almost always a model-choice issue on the loader node, not this one - check you're not on an fp16 checkpoint (the author's own warning: it "reduces quality by a LOT") or one of the metric-tuned variants, which trade edge sharpness for real-world scale you probably don't need.
Depth map flickers between frames if you're doing video. This node processes frame by frame with no temporal awareness, so running it across a video batch can produce visible flicker as the model's estimate shifts slightly frame to frame. That's a known limitation of image-based depth models on video generally - if flicker is a dealbreaker, a video-native depth model is the fix, not a setting here.
ControlNet results look too loose or too rigid. That's a ControlNet weight/end-step tuning question, not this node - the depth map itself is doing its job correctly. Lower weight (roughly 0.4-0.7) for loose creative guidance, higher (0.8-1.1) when you need strict spatial adherence, and consider ending ControlNet influence partway through sampling so detail generation isn't constrained the whole way through.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| da_model | DAMODEL | — | |
| images | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |