Nodes/Image Processing Suite for ComfyUI/DepthAnything Inference (AnotherUtils)
ComfyUI Node

DepthAnything Inference (AnotherUtils)

Depth Maps Straight Out of the Box, No Preprocessor Pack Needed

By marcoc2·Created 2 years ago·Updated 5 months ago· 1
DepthAnything Inference (AnotherUtils)
  • images
  • model
  • IMAGE
  • MASK

Depth maps are the workhorse of a dozen ComfyUI tricks: feeding a depth ControlNet so a new image keeps the same spatial layout, generating parallax motion, building masks of "foreground vs background," even prepping geometry for 3D. Usually you reach for a whole preprocessor pack to get them. AnotherDepthInference is the no-fuss alternative - it runs Depth Anything V3 locally and hands you both a grayscale depth image and a proper mask, all inside the AnotherUtils pack with nothing else to install.

The depth story here is worth a sentence of context: Depth Anything is the current king of monocular depth estimation, the descendant of MiDaS that's been the default since 2024. The V3 line this node uses auto-downloads its own weights from Hugging Face on first run, so there's no manual model hunting. That "just works" quality is the pack's signature - marcoags builds everything to be self-contained, and this is the best example of it.

How it works

You wire in a model object from AnotherLoadDepth (the pack's loader) plus your images, and the node runs each frame through the Depth Anything V3 pipeline. The raw prediction comes back at a fixed processing resolution and gets resized back to your image size, then normalized to 0–1 so near = bright, far = dark. It returns the same data twice in different wrappers: as a 3-channel grayscale image and as a raw mask, so you can plug it into either an image pipeline or a mask pipeline without conversion nodes.

The inputs

  • images - your image batch. It loops over every frame, so video frames and dataset batches work fine.
  • model - the ANOTHER_MODEL object from AnotherLoadDepth. There's no choosing inside this node; the loader is where model size and device get picked.

What comes out

  • IMAGE - the depth map as a grayscale RGB image, perfect for a depth ControlNet or parallax workflow.
  • MASK - the same depth data as a single-channel mask. Clip or threshold it (the pack's AnotherMaskMath is made for this) and you've got instant foreground/background separation.

Installing it

Standard AnotherUtils install:

cd ComfyUI/custom_nodes
git clone https://github.com/marcoc2/ComfyUI-AnotherUtils.git

Restart ComfyUI, or search "AnotherUtils" in ComfyUI Manager. Then install the one real dependency for the inference suite:

pip install depth-anything-3

The first run downloads the Depth Anything V3 weights automatically. Model choice and cuda/cpu device handling live in AnotherLoadDepth.

Where people get burned

The most common stumble is the missing depth-anything-3 package - the node raises a clear ImportError telling you to install it, so at least the error is honest. Second, remember the output is relative depth, normalized per image: white is simply "closer than" black, not "this many metres away." That's the right thing for ControlNet and masks, but if you need real distances, this isn't the tool. And for ControlNet specifically, depth maps want sharp edges - the V3 small/tiny models are faster but blurrier, so if your controlnet output looks mushy, step up to v3-medium or v3-large in the loader.

CategoryAnotherUtils/inference

Inputs (2)

NameTypeDefaultDescription
imagesIMAGE
modelANOTHER_MODEL

Outputs (2)

NameTypeDescription
IMAGEIMAGE
MASKMASK