Nodes/ComfyUI-QHNodes/(Down)load Checkpoint
ComfyUI Node

(Down)load Checkpoint

Pull a checkpoint from CivitAI or HuggingFace mid-workflow

By liuqianhonga·Created 2 years ago·Updated about a year ago· 5
(Down)load Checkpoint
    • ckpt_name
    sourcecivitai
    model_id
    base_modelFlux.1
    version_id
    file_names

    Normally, getting a checkpoint into ComfyUI means going to CivitAI or HuggingFace, copying a link, downloading it by hand, dropping it in models/checkpoints, and restarting so the loader picks it up. DownloadCheckpoint collapses that into a node: give it a model ID and a source, and it fetches the file for you as part of running the graph.

    How it works

    You pick a source (CivitAI or HuggingFace) and give it a model_id. The node reaches out, grabs the checkpoint, saves it into the right models folder, and outputs the resulting filename as ckpt_name - which you'd wire into whatever loads checkpoints downstream. It's marked as an output node, meaning ComfyUI treats it as a terminal step in the graph and will run it even if nothing consumes ckpt_name - so you can use it purely to pre-fetch a model onto disk without wiring anything past it.

    The inputs and outputs that matter

    • source - civitai or huggingface. Which registry to pull from.
    • model_id (STRING) - the numeric CivitAI model ID, or the HuggingFace repo path (org/repo).
    • base_model - one of SD1.5, SDXL, Flux.1, Kolors, or Pony. This is almost certainly used to sort the download into the right subfolder or validate compatibility rather than affecting what gets fetched, so set it to match what you're actually downloading.
    • version_id (optional, STRING) - CivitAI models have multiple versions under one model page; leave this blank and you'll presumably get the latest, or set it to pin a specific one.
    • file_names (optional, multiline STRING) - for versions that ship more than one file, this is how you narrow down which one you actually want.

    Output: ckpt_name - the filename to feed into a checkpoint loader.

    How to install it

    This node isn't part of the pack's core repo - it comes bundled through the integrated ComfyUI-Model-Downloader submodule. A plain clone of ComfyUI-QHNodes won't include it; you need the recursive clone:

    cd ComfyUI/custom_nodes
    git clone --recursive https://github.com/liuqianhonga/ComfyUI-QHNodes.git
    

    If you already cloned it without --recursive, pull the submodules in after the fact:

    cd ComfyUI/custom_nodes/ComfyUI-QHNodes
    git submodule init && git submodule update
    

    If you're installing through ComfyUI Manager instead, it's worth double-checking that this and the other Download* nodes actually showed up after install - Manager's install path is a plain git clone of the target repo, and submodule-based packs don't always come through fully that way. If the node's missing after an install-via-Manager, the recursive clone above is the reliable fallback.

    Common issues & troubleshooting

    HuggingFace download fails on a gated repo. There's no API key or auth token field anywhere in this node's inputs. Plenty of popular checkpoints (several official Flux.1 repos among them) are gated on HuggingFace and return nothing to an unauthenticated request - this node has no way to authenticate, so gated repos are effectively out of reach here.

    CivitAI download fails or returns nothing. CivitAI increasingly requires an account/API key to download certain models, particularly ones flagged under its content filters - same problem as above, no token field to satisfy that.

    Wrong version or wrong file downloaded. If a model page has multiple versions, leaving version_id blank is a gamble on what "latest" means to the node. Pin it explicitly, and if the version ships multiple files, use file_names to be specific rather than hoping it picks the right one.

    Category🐟QHNodes/🐟Model (Down)load

    Inputs (5)

    NameTypeDefaultDescription
    sourceCOMBOcivitai2 options: civitai, huggingface
    model_idSTRING
    base_modelCOMBOFlux.15 options: SD1.5, SDXL, Flux.1, Kolors, Pony
    version_idoptSTRING
    file_namesoptSTRING

    Outputs (1)

    NameTypeDescription
    ckpt_name*