Nodes/ComfyUI-SuperNodes/🐧 Model Downloader
ComfyUI Node

🐧 Model Downloader

Download models straight into the right ComfyUI folder, from inside the graph

By sonnyboxΒ·Created 11 months agoΒ·Updated 4 days agoΒ· 12
🐧 Model Downloader
    • model_name
    β—„urlβ–Ί
    β—„destinationβ–Ύβ–Ί
    β—„aliasβ–Ί
    β—„civitai_api_keyβ–Ί
    β—„huggingface_api_keyβ–Ί

    The 🐧 Model Downloader is a real download tool living inside your graph. Give it a URL and a target ComfyUI folder, and it streams the file there with a progress bar - then hands you the filename so you can feed it straight into a loader node. The usual dance of "open browser, download to Downloads, move the safetensors into the right folder" collapses into one node that just runs when you queue.

    The nice part is the smarts around the two big hosts. For a Civitai URL it detects the model page, rewrites it to the API download endpoint, and attaches your key. For HuggingFace it adds a Bearer token when you supply one - which is how you get gated repos. Both keys are optional inputs, but they also fall back to CIVITAI_API_KEY and HUGGINGFACE_API_KEY environment variables, so you can set them once and never paste a key into a workflow again.

    How it works

    Under the hood it's requests streaming with ComfyUI's progress bar, plus the details that make it not-annoying:

    • Resume support. If a download dies halfway, it resumes from where it stopped using HTTP Range/If-Range - as long as the server provides an ETag or Last-Modified. No more re-downloading a 7GB LoRA because the queue hiccuped.
    • Alias renaming. The optional alias input renames the saved file to whatever you want; the original extension is always preserved. If the exact same alias and size already exist, it skips the download entirely.
    • Offline fallback. If it can't reach the network but you gave an alias, it assumes the file already exists locally and just returns that name.

    The inputs that matter: url, destination (a dropdown of every valid ComfyUI model folder - checkpoints, loras, vae, and so on), and optionally alias. The output is model_name, which you can wire into the filename field of a checkpoint or LoRA loader - or read it as text.

    Installing it

    It's part of ComfyUI-SuperNodes (GitHub: sonnybox/ComfyUI-SuperNodes) by SuperCC. Install via Manager by searching SuperNodes, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/sonnybox/ComfyUI-SuperNodes
    # restart ComfyUI
    

    Only dependency is matplotlib; the pack needs a current ComfyUI since it uses the new comfy_api extension API.

    Where people get burned

    The big surprise is that Civitai requires an API key even for free public models - the node errors out with "API key not found" if you paste a civitai.com URL with no key configured. Grab one from your Civitai account settings and set CIVITAI_API_KEY in your environment. Also note only .safetensors, .pth, .pt, .onnx, and .ckpt are allowed - pointing it at a .gguf (common for quantized models) fails validation. And remember downloads happen while the graph runs: a huge checkpoint will make ComfyUI sit there until it's done, with progress printed to the console. If you'd rather not block the queue, use the terminal instead.

    CategorySuperNodes/Tools

    Inputs (5)

    NameTypeDefaultDescription
    urlSTRINGThe URL to download the model from.
    destinationCOMBOSelect the destination folder (e.g., checkpoints, loras).
    aliasoptSTRINGOptional custom output name without extension. The original file extension is always preserved.
    civitai_api_keyoptSTRINGOptional if CIVITAI_API_KEY is in your environment vars.
    huggingface_api_keyoptSTRINGOptional if HUGGINGFACE_API_KEY is in your environment vars.

    Outputs (1)

    NameTypeDescription
    model_name*β€”