Nodes/Comfyui-Distill-Any-Depth/Download Distill Any Depth Model
ComfyUI Node

Download Distill Any Depth Model

One dropdown, then it quietly downloads your depth model

By zade23·Created about a year ago·Updated 6 months ago· 6
Download Distill Any Depth Model
    • pipeline
    modelDistill-Any-Depth-Large

    This is the boring half of the pack, and that's a compliment. Everything in Comfyui-Distill-Any-Depth revolves around a DISTILLPIPE - a custom type this pack's two nodes use to talk to each other. DownloadDistillAnyDepthModel is the node that builds it. One dropdown, no knobs to fight with, and the model download mostly happens in the background the first time you run the workflow.

    What it actually does

    On the first run this node reaches out to Hugging Face, pulls the weights from the xingyang1/Distill-Any-Depth repo into ComfyUI/models/distill_any_depth/, and loads them into a model on your GPU. Then it packages everything - the loaded model, the compute device, the offload device - into that DISTILLPIPE dict and passes it downstream. Nothing else in ComfyUI can consume a DISTILLPIPE, so you can't route it anywhere except into the pack's own DistillAnyDepthProcessImage node. It's a mandatory first step in the workflow, not an optional convenience.

    The pack ships from a small side-project author (zade23, publisher id "zhandroid") and is genuinely new - there's no real community track record behind it yet. It's one of those packs you install knowing you'll be the early adopter.

    The one input that matters

    Everything hangs off the single model dropdown:

    • Distill-Any-Depth-Large (default) - the largest distilled student, best quality on a bigger ViT-Large backbone.
    • Distill-Any-Depth-Base / Small - lighter student models built on the Depth Anything v2 architecture (ViT-B and ViT-S encoders). Faster, lower VRAM, visibly softer maps.
    • Distill-Any-Depth-Teacher-Large-2w-iter - as the name suggests, the DAv2 teacher that supervised the students during distillation. Heaviest and slowest, but the quality ceiling of the lineup.

    Each one is cached under its own filename once downloaded, so switching models on a later run just reloads from disk - no second download.

    How it works, briefly

    Under the hood the loader builds the right architecture per model: Large and Teacher use the v1-style DepthAnything class, while Base and Small prefer DepthAnythingV2 and fall back gracefully if that import isn't available. For the large and teacher weights it also patches key names - they ship under a pretrained. prefix that gets renamed to backbone. to match the loader's expectations. Device management is handed off to ComfyUI's own model_management, so it plays nicely with the rest of your setup.

    Installing it

    Same install as the whole pack - it's a two-node package, you can't install one without the other:

    cd ComfyUI/custom_nodes
    git clone https://github.com/zade23/Comfyui-Distill-Any-Depth
    cd Comfyui-Distill-Any-Depth
    pip install -r requirements.txt
    

    Then restart ComfyUI. Or skip all of that and search Comfyui-Distill-Any-Depth in ComfyUI Manager's Custom Nodes browser. The requirements.txt pulls huggingface_hub, opencv-python, and scipy - the heavy torch/torchvision pieces you already have through ComfyUI.

    Where people get caught

    The loader itself doesn't keep the model resident; it builds a fresh pipeline each run, so the only real cost is a few seconds of load time per execution. The failure mode that matters is the first-run download - it needs network access and enough free disk, and if it dies halfway you're left with a partial file in models/distill_any_depth/. Delete that file and rerun; it will start clean. The model choice also changes your VRAM footprint on the process side, so if Large blows up your card later, come back here and switch to Small.

    The output you care about is the pipeline (DISTILLPIPE). Wire it straight into Distill Any Depth Process Image.

    CategoryDistillAnyDepth

    Inputs (1)

    NameTypeDefaultDescription
    modelCOMBODistill-Any-Depth-Large4 options: Distill-Any-Depth-Large, Distill-Any-Depth-Base, Distill-Any-Depth-Small, Distill-Any-Depth-Teacher-Large-2w-iter

    Outputs (1)

    NameTypeDescription
    pipelineDISTILLPIPE