ComfyUI Node
TS Image Depth
Depth map for a still, or for a batch of pictures that have nothing to do with each other. Runs Depth Anything V2 on every picture on its own, the same way the reference implementation does. For a video, where the map has to stay steady from frame to frame, use TS Video Depth instead.
TS Image Depth
- images
- image
◄model_filenamedepth_anything_v2_vitl_fp16.safetensors►
◄max_res-1►
◄precisionfp16►
◄colormapgray►
CategoryTS/Image/Depth
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | Picture, or a batch of pictures, as IMAGE (N, H, W, 3) in 0..1. Every picture is processed and normalized on its own — a batch here means unrelated images, not a video. | |
| model_filename | COMBO | depth_anything_v2_vitl_fp16.safetensors | Depth Anything V2 checkpoint, downloaded on first use to ComfyUI/models/depthanything. fp16 safetensors is half the download and loads far quicker; measured against pure fp32 it differs by 0.02% of the depth range, which is nothing. |
| max_res | INT | -1-1–8192 | Longest side the picture is processed at, snapped down to a multiple of 14 (the DINOv2 patch grid). The only quality control here. • -1 (default) — native resolution, exactly what the reference implementation does. Nothing is resampled, so nothing is lost. • 1540 — noticeably quicker on large photos and still sharp; the map comes back up to full size bilinearly. • lower — when VRAM is tight. Depth Anything V2 stops gaining much above roughly 2000 px, so raising this without limit buys little. On out-of-memory the node retries at half the size, and again, logging each step. |
| precision | COMBO | fp16 | Inference dtype. • fp16 (default) — 2x faster, ~50% less VRAM. • fp32 — measured difference against fp16 is 0.02% of the depth range. Worth it only if you are chasing the last bit on a smooth surface and have the VRAM to spare. |
| colormap | COMBO | gray | Output color mapping. • gray (default) — the raw normalized depth in all three channels, which is what the reference returns. Use this when the map feeds another node (ControlNet, 3D, and so on). • inferno / viridis / plasma / magma / cividis — perceptually uniform matplotlib colormaps, for looking at. Bilinear LUT interpolation removes 8-bit banding. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | Depth map as IMAGE (N, H, W, 3) float in 0..1 at the original resolution. An ordinary IMAGE — feed it straight into ControlNet, a save node, and so on. |