ComfyUI Node

HF Download

Grab one file out of a Hugging Face repo, no manual clone

By ciri·Created 2 years ago·Updated 26 days ago· 126
HF Download
    • filename
    repo_idrunwayml/stable-diffusion-v1-5
    filenamev1-5-pruned-emaonly.ckpt
    local_path
    overwritetrue
    local_path_override
    hf_token

    Hugging Face repos are where the actual base models live - Flux, Wan, Qwen, whatever ships this month - but pulling one file out of a repo into your ComfyUI folder normally means finding the exact filename on the repo's Files tab, copying a URL, downloading it, and moving it into place by hand. HF Downloader does that inside the graph: point it at a repo and a filename, it fetches straight into your models folder while the workflow runs.

    How it works

    It's a targeted single-file grab, not a full repo clone - you're not pulling every checkpoint variant a repo has, just the one you name. That means you do need to know the exact filename in advance (open the repo's Files and versions tab on huggingface.co and copy it), because there's no browsing built into the node.

    The inputs that matter

    • repo_id - the org/name path, e.g. black-forest-labs/FLUX.1-dev. The node's placeholder default is runwayml/stable-diffusion-v1-5 - worth flagging up front: that specific repo doesn't exist anymore. HuggingFace's official SD 1.5 repo vanished in August 2024, so if you leave the field on its default and hit queue, you'll get a 404. The license permits reuploads and the community has them; point repo_id at one of those instead of the placeholder.
    • filename - the exact file inside that repo (default v1-5-pruned-emaonly.ckpt, which pairs with the dead repo above - same caveat applies). Big repos routinely ship several variants of the same model - fp8, fp16, pruned, full - with very similar names, so a typo here fails quietly with a not-found rather than warning you the name is close-but-wrong.
    • local_path - a dropdown of ComfyUI's standard model folders (checkpoints, loras, vae, controlnet, and about twenty more).
    • local_path_override (optional) - a free-text path that wins over whatever you picked in local_path. Use it if you need a subfolder or a location the dropdown doesn't cover.
    • overwrite (optional, default true) - re-downloads and replaces the file even if it's already sitting there. Flip it off once you've got the file you want, so re-running the workflow doesn't burn bandwidth re-fetching a multi-gigabyte checkpoint every time.
    • hf_token (optional) - needed for gated repos. A lot of the models everyone actually wants - Flux Dev included - sit behind HuggingFace's gate: you request access on the repo page, and the author can revoke that access at any time without notice. A token from your HF account settings lets this node authenticate as you; it doesn't substitute for having been granted access in the first place.

    The output, filename, is the downloaded file's name as a string - feed it straight into the pack's Downloaded Checkpoint Loader and you've got a load-on-fetch pipeline with no manual step in between.

    Installing it

    Via ComfyUI Manager: search "ComfyUI Model Downloader", install, restart. Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ciri/comfyui-model-downloader.git
    

    Restart ComfyUI. It's a thin API-fetch node - no heavy inference dependencies of its own - so installing it is fast either way.

    Common issues

    404 on a repo you swear existed. HuggingFace repos are not a permanent archive - authors delete them, and even official ones have disappeared (SD 1.5 being the canonical example). If a repo_id that used to work suddenly 404s, check whether the repo moved or got pulled before assuming you mistyped it.

    Access denied even with a token set. A token proves who you are; it doesn't grant access to a gated repo by itself. You still need to have requested - and been approved for - that specific repo on huggingface.co first.

    Wrong variant downloaded. If your results look off after a "successful" download, double-check filename against the repo's file list - fp8 vs. fp16 vs. pruned builds of the same model can differ meaningfully in output.

    Re-downloading every run. Set overwrite to false, or bypass the node once you have the file - same advice as the README gives for the CivitAI side of this pack.

    Categoryloaders

    Inputs (6)

    NameTypeDefaultDescription
    repo_idSTRINGrunwayml/stable-diffusion-v1-5
    filenameSTRINGv1-5-pruned-emaonly.ckpt
    local_pathCOMBO25 options: audio_encoders, background_removal, checkpoints, classifiers, clip_vision, configs, +19
    overwriteoptBOOLEANtrue
    local_path_overrideoptSTRING
    hf_tokenoptSTRING

    Outputs (1)

    NameTypeDescription
    filenameSTRING