Nodes/ComfyUI-Depth-Pro/(Down)Load Depth Pro model
ComfyUI Node

(Down)Load Depth Pro model

The name is a lie — this node downloads the model too

By spacepxl·Created 2 years ago·Updated 2 years ago· 209
(Down)Load Depth Pro model
    • depth_pro_model
    precision

    The display name is "(Down)Load Depth Pro model" and both halves are doing real work. On first run this node fetches the weights from Hugging Face and drops them where ComfyUI expects them; every run after that it just loads the model into VRAM. One node, two jobs, zero trips to the Hugging Face website.

    This is the model-loading half of the ComfyUI-Depth-Pro pack, which wraps Apple's Depth Pro - the 2024 "sharp monocular metric depth in less than a second" model that outputs real distances in meters plus a focal-length estimate. If you've used Depth Anything for ControlNet preprocessing, this is the different-flavored cousin: less a preprocessor, more a geometry tool. The load node is the boring but essential part - you can't run the Depth Pro inference node without its DEPTH_PRO_MODEL output.

    How it works

    Check the source and it's pleasantly honest: it looks for ComfyUI/models/depth/ml-depth-pro/. If the folder doesn't exist, it calls snapshot_download on the spacepxl/ml-depth-pro repo and pulls depth_pro.fp16.safetensors into that exact path. Then it builds the model with Apple's create_model_and_transforms, switches it to eval mode, and hands the whole thing back as a DEPTH_PRO_MODEL blob you feed into the Depth Pro node.

    So the "download" isn't a one-time setup script you have to remember - it's baked into the node itself. If you'd rather not let a node reach out to the internet, grab the file manually from the same HF repo and drop it in ComfyUI/models/depth/ml-depth-pro/. Same result, no surprise download.

    The one input: precision

    There's exactly one thing to set, an enum with two choices:

    • fp16 - half precision. The default, and the right call 95% of the time. Fast, roughly half the VRAM, and for a depth map nobody can tell the difference.
    • fp32 - full precision. Only reach for this if you're chasing some precision bug in a downstream 3D pipeline and have the VRAM to burn.

    Don't overthink it. fp16 is basically the model's intended operating mode.

    The single output is depth_pro_model, which is not a real "type" you can preview - it's a dict holding the model, the device, and the dtype. It wires straight into the Depth Pro node's depth_pro_model input, and nowhere else.

    Install

    Same as the rest of the pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/spacepxl/ComfyUI-Depth-Pro
    

    or find ComfyUI-Depth-Pro in ComfyUI Manager's Custom Nodes search and hit Install. Restart, and let Manager install the requirements: timm>=0.9.16 and numpy<2. The pack's own code is Apache-2.0; the vendored Apple model code keeps Apple's original license.

    Troubleshooting

    • vit_large_patch14_dinov2 error at load time - your timm is too old. The README pins the tested versions: 0.9.16 or 1.0.9. pip install -U timm and restart.
    • First run hangs for a while - it's downloading a model, not dead. Watch your network; the node prints nothing helpful while it fetches.
    • numpy errors - the pack pins numpy<2, so if another node upgraded you past it, you may need to reinstall. That pin is deliberate.

    The one trap worth naming: people expect a model picker dropdown. There isn't one, because there's only one model. If you want it in a different place than models/depth/ml-depth-pro/, you're stuck - the path is hardcoded. For most people that's fine; it's where the pack put it on purpose.

    CategoryDepth-Pro

    Inputs (1)

    NameTypeDefaultDescription
    precisionCOMBO2 options: fp16, fp32

    Outputs (1)

    NameTypeDescription
    depth_pro_modelDEPTH_PRO_MODEL