Nodes/ComfyUI-DepthAnythingV2/DownloadAndLoadDepthAnythingV2Model
ComfyUI Node

DownloadAndLoadDepthAnythingV2Model

Get the depth model into your graph

By kijai·Created 2 years ago·Updated 5 months ago· 428
DownloadAndLoadDepthAnythingV2Model
    • da_v2_model
    modeldepth_anything_v2_vitl_fp32.safetensors
    precisionauto

    This is the loader half of Kijai's Depth Anything V2 pack - pick a checkpoint from a dropdown, and it fetches the weights and hands you a model object the actual depth-generation node can use. If you've used any other Kijai wrapper (WanVideoWrapper, IC-Light, LivePortraitKJ), you already know this pattern: a DownloadAndLoad... node that auto-pulls from a HuggingFace repo the first time you run it, so there's no manual model-hunting.

    Why it's a separate node

    ComfyUI likes splitting "load the model" from "do the thing" so you're not re-downloading or re-initializing weights every single run - load once, reuse across a batch, swap it out without touching the rest of the graph. Here that means this node exists purely to produce a DAMODEL object; it doesn't touch your images at all. That happens downstream in the DepthAnything_V2 node.

    The inputs that matter

    • model - a dropdown of nine checkpoints, defaulting to depth_anything_v2_vitl_fp32.safetensors. The naming tells you the size: vits (Small), vitb (Base), vitl (Large), and vitg (Giant, Large-only in fp32 - there's no fp16 Giant listed). Large is also the community's actual daily-driver pick for depth ControlNet work, so the default here isn't just a random first entry - it's the right one to start with. Giant is the quality ceiling (1.3B params) but noticeably slower - expect something like 10-20 seconds per image on a 4090 versus a few seconds for Large. Small is what you reach for when you need speed over precision, like a live preview.
    • Two of the nine are different animals: depth_anything_v2_metric_hypersim_vitl_fp32 and ..._metric_vkitti_vitl_fp32. These output metric depth (real-world distances, fine-tuned on indoor and outdoor scene datasets respectively) instead of the usual relative depth. Skip these unless you specifically need actual distances - for ControlNet conditioning, relative depth with sharp edges beats metric accuracy, which is why the plain non-metric checkpoints are what nearly everyone uses.
    • precision (optional, default auto) - the compute precision the model runs at once loaded, separate from which checkpoint file you picked. Leave it on auto unless you have a specific reason not to.

    One thing the author flags directly in the node's own description: don't pick an fp16 checkpoint - "fp16 reduces quality by a LOT, not recommended." That's about the _fp16 entries in the model dropdown specifically (vits/vitb fp16 variants), not the precision input. Stick to the fp32 checkpoints and let precision handle any speed/memory tradeoff instead.

    Output

    One output, da_v2_model (type DAMODEL) - a pack-specific type. It only plugs into the da_model input on the DepthAnything_V2 node; you can't feed it into a generic model loader or checkpoint slot.

    How to install it

    Through ComfyUI Manager: search "ComfyUI-DepthAnythingV2", install, restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/kijai/ComfyUI-DepthAnythingV2
    

    then restart ComfyUI. There's no separate model-download step to remember - the first time you run this node with a given checkpoint selected, it pulls the .safetensors file straight from Kijai/DepthAnythingV2-safetensors on HuggingFace into ComfyUI/models/depthanything. Worth noting: that HF repo is Kijai's own re-packaging - the official Giant checkpoint was briefly published then quietly delisted from the upstream repo, and this is where the community-preserved safetensors version lives.

    Common issues & troubleshooting

    First run stalls or errors on download. That's the auto-download happening - it needs outbound internet access from wherever ComfyUI is running, and the Giant checkpoint especially is a meaningful download. If it fails partway, delete the partial file in ComfyUI/models/depthanything and re-run rather than assuming the node is broken.

    Depth maps look softer/muddier than you expected. Check you didn't pick an fp16 checkpoint - that's the one quality knob the author explicitly warns is a bad idea, and it's an easy dropdown misclick since it sits right next to the fp32 version of the same size.

    You grabbed a metric checkpoint by mistake. If your depth map looks unusually flat or your ControlNet results are worse than expected, double check you didn't select metric_hypersim or metric_vkitti - those are tuned for absolute distance, not the sharp relative contrast ControlNet wants.

    Wrong node connected. da_v2_model only wires into DepthAnything_V2's da_model input - if you're trying to plug it somewhere else, that's not this node's job; the depth map generation happens one node downstream.

    CategoryDepthAnythingV2

    Inputs (2)

    NameTypeDefaultDescription
    modelCOMBOdepth_anything_v2_vitl_fp32.safetensors9 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, +3
    precisionoptCOMBOauto4 options: auto, bf16, fp16, fp32

    Outputs (1)

    NameTypeDescription
    da_v2_modelDAMODEL