Nodes/ComfyUI Deploy/External Lora (ComfyUI Deploy)
ComfyUI Node

External Lora (ComfyUI Deploy)

Point your API callers at a LoRA without them ever touching your disk

By BennyKok·Created 3 years ago·Updated 10 months ago· 1,529
External Lora (ComfyUI Deploy)
    • path
    â—„input_idinput_loraâ–º
    ◄default_lora_name▾►
    â—„lora_save_nameâ–º
    â—„display_nameâ–º
    â—„descriptionâ–º
    â—„lora_urlâ–º
    â—„bearer_tokenâ–º

    LoRAs are small - tens to a couple hundred MB - which makes them the one model type it's actually reasonable to let API callers swap per request. "External Lora" is the ComfyUI Deploy input node for that: it exposes a dropdown of the LoRAs installed on the machine, and it can also download a LoRA from a URL on the fly, returning the filename for your LoraLoader to apply. Character LoRAs, style LoRAs, "let the customer bring their own" - this is how that works in a deployed workflow.

    It's the LoRA sibling of the External Checkpoint node, with one meaningful upgrade: it lets you pin a save name, so a frequently-used LoRA is downloaded once and reused instead of re-fetched on every call. For an API that serves a handful of known LoRAs, that's the difference between a snappy endpoint and one that redownloads the same file forever.

    How it works

    Two paths. If lora_url starts with http, the node downloads it into ComfyUI's models/loras folder - as lora_save_name if you gave one (skipping the download when that file already exists), otherwise as a fresh uuid filename. If you supply a bearer_token, it's sent as an Authorization: Bearer … header, which is how you handle credentialed downloads (Civitai and private hosts). If there's no URL, the node returns whatever default_lora_name holds - the dropdown of installed LoRAs.

    Inputs and output

    • input_id - default input_lora. The key callers use to address this input.
    • default_lora_name - an installed LoRA for the no-URL case.
    • lora_save_name - pin a filename to enable the skip-if-exists cache.
    • lora_url - where to fetch the LoRA from.
    • bearer_token - for authenticated downloads.
    • Optional: display_name, description.

    Output: path (wildcard *), wired into your LoraLoader's lora name input.

    Installing it

    Same pack install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/BennyKok/comfyui-deploy.git
    

    Restart ComfyUI, or install "ComfyUI Deploy" via ComfyUI Manager. No models bundled - the dropdown lists whatever's already in your models/loras folder.

    Where people get burned

    The bearer-token field is easy to misuse: it only applies when lora_url is set, and it's only for downloads. People paste their Civitai API key in and wonder why the node ignores it when they pick a LoRA from the dropdown - right, no URL, no download, no token needed. Keep it for the URL path only, and remember that key is visible in your workflow JSON; treat it like a secret, because it is one.

    Second, pin lora_save_name. Without it, every URL-driven call downloads a fresh uuid-named copy - the same orphan-file creep as the checkpoint node, just smaller. And there's no graceful fallback when a URL download fails: no URL handling means the node just returns the default, so a dead LoRA link quietly produces a run without your LoRA. Check the console when the style mysteriously vanishes.

    Category🔗ComfyDeploy

    Inputs (7)

    NameTypeDefaultDescription
    input_idSTRINGinput_lora—
    default_lora_nameoptCOMBO0 options:
    lora_save_nameoptSTRING—
    display_nameoptSTRING—
    descriptionoptSTRING—
    lora_urloptSTRING—
    bearer_tokenoptSTRING—

    Outputs (1)

    NameTypeDescription
    path*—