Depth Anything V2 (nikosis)
Depth maps from Depth Anything V2, minus the dependency tango
- images
- image
The depth map is the quiet workhorse of half your favorite workflows. It's what a depth ControlNet uses to force spatial structure, and what those "living photo" parallax videos warp against. Depth Anything V2 is the model people actually reach for in 2026 - and this node runs it without you installing the whole controlnet_aux circus. Drop an image in, get a grayscale depth map out, wire it into a ControlNet.
What it actually is
A self-contained Depth Anything V2 inference node: DINOv2 backbone plus a DPT head, the same architecture as the current-generation depth models the KB calls "the current default" for ControlNet work. Unlike the pack's other nodes (pure OpenCV edge/lineart detectors), this one runs a real neural network - it's the heavyweight of the pack, and the only node here that downloads serious weights.
The model is picked from a dropdown with eight entries: vits, vitb, and vitl (Small, Base, Large), each in fp16 and fp32, plus the two metric variants (metric_hypersim_vitl_fp32, metric_vkitti_vitl_fp32). The default is vitl_fp32, which is also the slowest and biggest - over a gigabyte, and it churns on any non-CUDA setup. My advice: start with vitb_fp16 (or vits_fp16 if you're on a weaker card). The vitl is noticeably better on fine geometry, but it's a quality-at-the-end-of-the-day upgrade, not a "my images are broken" fix. The metric models output real-world scale and are mostly for measurement/3D work - for ControlNet, skip them.
Inputs that matter
Only four, and you'll touch two of them:
- model - the dropdown above. The only input that changes output character.
- resolution (default 1024, range 112–2048) - where people get burned: this node processes at no less than 1024 on the short side no matter what you set. Lowering it to 512 doesn't speed anything up; it only shrinks the output. Raise it if you want higher-detail maps on big images.
- manual_resolution (default off) - off means the output gets resized back to your original image's dimensions. Flip it on and the output is pinned to the
resolutionyou set (aspect preserved), which is handy when you need a depth map at a fixed size to match another condition. - images - your batch or single image.
The output is one IMAGE: a grayscale depth map (repeated to 3 channels) normalized per frame so near stuff reads white and far stuff black. Feed it straight into a depth ControlNet's conditioning image input, or into a parallax/2D-to-3D node.
Installing it
This is the ComfyUI-Nikosis-Preprocessors pack, from Nikosis - the same author as the ComfyUI-Nikosis-Nodes style/prompt pack you'll see recommended on r/comfyui. A real community author, just not a big name.
- ComfyUI Manager (easiest): Custom Nodes Manager → search ComfyUI-Nikosis-Preprocessors → Install → restart.
- Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/Nikosis/ComfyUI-Nikosis-Preprocessors comfyui-nikosis-preprocessors, thenpip install -r requirements.txt(Windows portable:..\..\..\python_embeded\python.exe -m pip install -r requirements.txt), restart.
requirements.txt pulls torch, torchvision, accelerate, opencv-python, einops and friends - mostly already in a working ComfyUI. The one thing to know: the weights come from the author's own Hugging Face mirror (Nikos7766/DepthAnythingV2), not the official repo, and they land in ComfyUI/models/controlnet/preprocessors/depthanythingv2/. First run downloads whatever model you selected, so if HF is slow or unreachable the node errors at load. It'll find an already-downloaded copy there on the next run, so a reinstall doesn't re-fetch.
Gotchas
- The model loads into VRAM, runs, then offloads back to CPU and clears the cache - friendly for low-VRAM rigs, but it means the first frame of a batch pays a load tax.
- A progress bar walks each image in your batch, so batches work fine.
- If you get a "model not found" style error, check that
models/controlnet/preprocessors/depthanythingv2/has your selected file and that the first-run download actually completed.
Worth it? If you want Depth Anything V2 and only that, this is a clean, one-pack way to get it. If you're already running controlnet_aux, its own depth node covers you - but PyraCanny aside, this pack stands on its own for depth.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| model | COMBO | depth_anything_v2_vitl_fp32.safetensors | 8 options: depth_anything_v2_vits_fp16.safetensors, depth_anything_v2_vits_fp32.safetensors, depth_anything_v2_vitb_fp16.safetensors, depth_anything_v2_vitb_fp32.safetensors, depth_anything_v2_vitl_fp16.safetensors, depth_anything_v2_vitl_fp32.safetensors, +2 |
| manual_resolution | BOOLEAN | false | — |
| resolution | INT | 1024112–2048 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |