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

(Down)load LoRA

Fetch a LoRA from CivitAI or HuggingFace by ID

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

    Same idea as its sibling DownloadCheckpoint, aimed at LoRAs instead: give it a model ID from CivitAI or HuggingFace, and it fetches the file into your models/loras folder as part of running the workflow, instead of you tabbing over to a browser first.

    How it works

    Pick a source, hand it a model_id, and it downloads the LoRA to the right place and reports back the filename as lora_name. It's marked as an output node, so ComfyUI will run it even if nothing downstream consumes that filename - useful if you just want to use the graph itself to pre-fetch a batch of LoRAs onto disk without building anything past this node.

    The inputs and outputs that matter

    • source - civitai or huggingface.
    • model_id (STRING) - the CivitAI numeric model ID, or the HuggingFace repo path.
    • base_model - SD1.5, SDXL, Flux.1, Kolors, or Pony. Match this to what the LoRA was actually trained on; LoRAs are architecture-specific and a Flux LoRA will not load onto an SDXL model or vice versa, so this field is worth getting right even if it's mainly used for sorting the download.
    • version_id (optional) - pins a specific version on a CivitAI model page that has more than one.
    • file_names (optional, multiline) - narrows which file to grab when a version ships more than one.

    Output: lora_name - wire this into a LoRA loader, including the pack's own LoadLoraFromFolder if you point that node at the same folder this one downloads into.

    How to install it

    This is a submodule node, not part of the pack's core repo - it comes from the bundled ComfyUI-Model-Downloader integration. A bare clone won't include it:

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

    Already cloned without --recursive? Pull it in after the fact:

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

    If you installed through ComfyUI Manager and this node is missing from the node list after a restart, that's the likely reason - Manager's default install is a plain clone, and submodule-based packs don't always come through complete that way. The recursive clone above is the reliable fix.

    Common issues & troubleshooting

    Nothing downloads, no error. Check model_id is actually the numeric ID (for CivitAI) or the correct org/repo string (for HuggingFace) - a pasted URL instead of an ID is a common mistake with model-download nodes generally.

    Gated or login-required models fail silently. There's no API key or token input anywhere on this node. Gated HuggingFace repos, and CivitAI models that require an account to download (increasingly common for anything flagged under CivitAI's content filters), have no way to authenticate here - this node is built for the plain, public, no-login case.

    Wrong LoRA version lands. If a model page has multiple published versions and you didn't set version_id, you're trusting the node's notion of "latest" rather than choosing yourself. Pin it explicitly if you care which one you get, especially for LoRAs that get re-uploaded with fixes.

    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
    lora_name*