Nodes/Duanyll Nodepack/HuggingFace Checkpoint Loader
ComfyUI Node

HuggingFace Checkpoint Loader

The loader that refuses to download for you

By Duanyll·Created about a year ago·Updated 4 months ago· 2
HuggingFace Checkpoint Loader
    • MODEL
    • CLIP
    • VAE
    repo_id
    subfolder
    filename

    HuggingFace Checkpoint Loader is the pack's take on the classic Load Checkpoint node, with one crucial difference that will trip you up the first time: it does not download anything. Given a Hugging Face repo_id, it resolves the repo to the local Hugging Face cache on your disk (~/.cache/huggingface) and loads the checkpoint from there. If the model isn't cached, it throws a clear error telling you to run hf download <repo_id> first. That's not a bug - it's the design, and it makes the node offline-friendly and predictable, but it means the name oversells what it does out of the box.

    The appeal is that the Hugging Face cache is the ecosystem's upstream - base models and research weights ship there first, as git repos with real revision tracking (see the KB's Hugging Face panel). If you already manage models with huggingface-cli or the HF cache, this node lets ComfyUI read straight from that same store instead of maintaining a second models/checkpoints copy. It also handles sharded checkpoints - you point it at the .index.json and it merges all the shards.

    The inputs

    • repo_id - a HF repo ID like black-forest-labs/FLUX.1-dev, an absolute local path, or a ./relative path from the ComfyUI root. This is the "download first" field.
    • subfolder (optional) - where the model lives inside the repo or path.
    • filename (optional) - the file to load; auto-detects if blank. For sharded checkpoints, give it the index file (e.g. model.index.json).

    Three outputs: MODEL, CLIP, VAE - the full checkpoint, one node.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/Duanyll/duanyll_nodepack
    cd duanyll_nodepack && pip install -r requirements.txt
    

    or ComfyUI Manager → "Duanyll Nodepack" → install → restart. The node needs huggingface-hub (in the pack requirements) for the cache path, plus ComfyUI's own loader machinery.

    The gotcha that defines this node

    Before your first use: hf download <repo_id> into the default cache, then point the node at it. Actually getting the model there is on you:

    hf download black-forest-labs/FLUX.1-dev
    

    If you skip that, you'll hit the "Run hf download first" error - the node intentionally never makes a network call, even under HF_HUB_OFFLINE. This is either a feature (deterministic, works fully offline, no surprise multi-GB downloads at workflow runtime) or a frustration (you expected it to fetch). Compared to stock ComfyUI, which downloads into models/checkpoints on demand, this node is for people who already live in the HF cache world. If that's not you, the built-in loaders are the simpler path. If it is, this is a clean bridge with solid shard handling.

    Categoryduanyll/loaders

    Inputs (3)

    NameTypeDefaultDescription
    repo_idSTRINGThe Hugging Face repo ID, an absolute path (/path/to/model), or a relative path (./models/...) from the ComfyUI root.
    subfolderoptSTRINGThe subfolder where the model is located. Applies to both Hugging Face repos and local paths.
    filenameoptSTRINGThe checkpoint file to load. If not specified, will auto-detect. For sharded checkpoints, use the index file (e.g., 'model.index.json').

    Outputs (3)

    NameTypeDescription
    MODELMODEL
    CLIPCLIP
    VAEVAE