LC Depth Anything V2 π
Depth maps from one image, using the weights you already have
- image
- depth
- depth_mask
Depth Anything V2 is the reason nobody argues about depth preprocessors any more. It shipped in June 2024, sharpened the edges over v1 and stopped guessing nonsense on glass and water, and its Large checkpoint has been the daily-driver default ever since - unbeaten through mid-2026 even after ByteDance's own Depth Anything 3 turned up and turned out to be a 3D reconstruction model rather than a depth-map generator.
This node wraps it. One image in, a normalized depth map out, plus the same map as a MASK. The thing that makes it worth a second look over comfyui_controlnet_aux, which does the same job: it reads the copy of the weights you already have instead of making you download a second one.
How it works
A DPT head on a DINOv2 backbone, both vendored into the pack - the model code ships with the node, so there's no extra pip install and no comfyui_controlnet_aux dependency. It runs on the shorter side of your image at the size you ask for, then normalizes the result 0β1 per image, meaning the closest thing in frame is white and the farthest is black regardless of absolute distance. That's relative depth, and relative is exactly what you want for conditioning.
The author measured it against comfyui_controlnet_aux's Depth Anything V2 implementation at correlation 1.000, so if you're moving an existing workflow over, the maps should be interchangeable rather than merely similar.
The inputs
model is the one to think about, because the license is printed right in the entry:
Depth Anything V2 Small (Apache-2.0)- first in the list, so it's the default. Fast, and the only one you can use commercially.BaseandLarge- CC-BY-NC-4.0. Fine for personal work, not fine for a client.- The dropdown lists three sizes on every machine, so a workflow you share never shows someone a missing model.
resolution (default 518, 224β2044 in steps of 14) is the size the shorter side is processed at. 518 is what the model was trained at and it's the honest default; pushing it higher can recover fine detail on a big input, at a linear cost in time. The steps-of-14 thing isn't arbitrary - the network's patch size constrains it, and the node rounds for you.
invert flips the convention: off means bright = near, which is what Depth Anything and every depth ControlNet expects. Turn it on only if a downstream node wants bright = far.
Outputs are depth, a 3-channel IMAGE you can preview, save, or feed a depth ControlNet, and depth_mask, the same data as a MASK for the paths that want a mask instead.
Where you'd use it
Three jobs, in rough order of how often people actually do them. First, depth ControlNet conditioning - redraw a scene in a new style while keeping every spatial relationship intact. Second, fake parallax: warp along the map and you get the "living photo" effect, and it's the same data stereo splits are built from. Third, mask-shaped uses - a depth-derived mask is a cheap way to isolate foreground from background, or to drive a depth-of-field pass without a segmentation model.
There's also a pack-local reason: both this node and LC Normal Map are what LC Lighting Control in the companion pack ComfyUI_LC123_nodes wants as its depth_map and normal_map inputs. If you're using LC123's relighting nodes, this is upstream of them.
One caveat from the wider ecosystem worth knowing: running any depth model frame by frame over a video flickers, because each frame is normalized against its own histogram. If you're doing video, a video-native depth model is the fix - this node is a still-image tool.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/lonecatone23/ComfyUI_LC_MaskMaker_nodes
# restart ComfyUI
Or Manager β search LC MaskMaker. The pack's installer adds transformers and huggingface_hub only if they're missing, which on almost any ComfyUI install they aren't.
Model weights are never bundled. First run either downloads the checkpoint you picked into models/depthanything, or reuses a copy already sitting there - it also looks in the comfyui_controlnet_aux folder, so if you've been running depth ControlNets for two years you already have the file and nothing gets fetched.
Gotchas
- You picked Large on a commercial job. CC-BY-NC-4.0. Small is the Apache one. The label is in the dropdown; read it.
- First run feels slow and then everything is fine. That's the download.
- Two depth maps side by side don't match. Different
resolution, or one hasinverton. At identical settings they matchcomfyui_controlnet_auxexactly. - Depth looks inverted vs a tutorial's settings. Depth ControlNet models in the wild disagree on convention. Flip
invertand see which one your ControlNet actually likes - it's a one-toggle test, not a mystery. - The map looks noisy at high resolution. You asked for more resolution than the model has detail for. 518 is the trained size for a reason.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Image to estimate depth for. | |
| model | COMBO | Depth Anything V2 weights. The license is in the label: Small is Apache-2.0, Base / Large / Giant are CC-BY-NC-4.0 (non-commercial). Uses the file you already have (models/depthanything or comfyui_controlnet_aux), or downloads it the first time you run. | |
| resolution | INT | 518224β2044 | Size the shorter side is processed at (rounded to a multiple of 14). 518 is what the model was trained at; higher can add detail on big images. |
| invert | BOOLEAN | false | Off: bright = near (what Depth Anything and depth ControlNets use). On: bright = far. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| depth | IMAGE | β |
| depth_mask | MASK | β |