Nodes/ComfyUI-SwissArmyKnife/VACE Annotator - Depth
ComfyUI Node

VACE Annotator - Depth

Depth maps for Wan's VACE control — MiDaS or Depth Anything V2, batched

By sammykumar·Created 12 months ago·Updated 8 months ago· 6
VACE Annotator - Depth
  • images
  • depth_maps
model_typemidas
resolution512
model_path

Depth maps are the oldest trick in the control game: white is close, black is far, and a model that understands that can keep your scene's geometry intact while you change everything else. In the Wan world, that control path runs through VACE - the video-era answer to ControlNet - and VACE Annotator - Depth is the preprocessing half: it turns your image batch into depth maps the VACE pipeline can consume.

The node takes images (an IMAGE tensor, batches supported - so feed it all your video frames at once), a model_type of midas (default) or depth_anything_v2, and a resolution (default 512, adjustable 64–2048 in steps of 64). The model choice is the classic trade, and the community history backs it up: MiDaS is the reliable veteran with sharp edges, and Depth Anything V2 is the modern upgrade with notably better structure on tricky scenes - Depth Anything's release was greeted with "we need this badly as a controlnet preprocessor" for good reason. For VACE work the difference mostly shows on complex backgrounds; for flat-ish scenes either works. resolution is your speed/quality dial - the tooltip's blunt: lower is faster, higher is more detail. Start at 512, drop to 384 if a long batch is crawling.

The optional model_path lets you point at a custom checkpoint; leave it empty and it looks in the default location. That default location is where the gotcha lives - the models are not bundled with the pack. The VACE-Annotators checkpoints come from Hugging Face (ali-vilab/VACE-Annotators), and the node expects them at:

ComfyUI/models/vace_annotators/depth/   (e.g. midas.pth, depth_anything_v2.pth)

One IMAGE output, depth_maps, ready to feed the VACE conditioning stack. Under the hood it's torch with a class-level model cache - load once, process the whole batch, reuse across runs - and it resizes frames to your chosen resolution before inference, so your output maps land on the canvas size you asked for.

Installing

Part of Swiss Army Knife:

  • ComfyUI Manager: search "Swiss Army Knife", install, restart.
  • Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/sammykumar/ComfyUI-SwissArmyKnife.git
cd ComfyUI-SwissArmyKnife
pip install -e .

Then download the depth checkpoints from the ali-vilab/VACE-Annotators HF repo and place them under models/vace_annotators/depth/.

Gotchas

  • Missing checkpoint = immediate error. If you haven't downloaded the model, the node fails the moment it runs. The README's model-location list is the source of truth.
  • Depth works best on scenes with real depth. Flat, textureless shots give flat, useless maps - a model limitation, not a node bug.
  • Higher resolution is tempting and expensive. 2048 on a long video batch will feel like watching paint dry; 512 is the sane default.

This is a specialist node for a specialist pipeline: it only earns its keep inside a Wan + VACE workflow that actually conditions on depth. If that's what you're building, it's the missing preprocessing piece, batched and cache-friendly.

CategorySwiss Army Knife 🔪/VACE Annotators

Inputs (4)

NameTypeDefaultDescription
imagesIMAGEInput images or video frames (batch supported)
model_typeCOMBOmidasDepth estimation model to use
resolutionINT51264–2048Processing resolution (lower = faster, higher = more detail)
model_pathoptSTRINGCustom path to model file (leave empty for default: models/vace_annotators/depth/)

Outputs (1)

NameTypeDescription
depth_mapsIMAGE