ComfyUI Node

Model Downloader

A download node that fetches models straight into your ComfyUI folders

By alessandroperilli·Created about a year ago·Updated 10 months ago· 4
Model Downloader
    • FILE_PATH
    urlhttps://huggingface.co/perilli/OCS_Models/resolve/main/VAE/Image/flux1_vae.safetensors
    folder/tmp/ComfyUI/models
    filenameflux1_vae.safetensors
    token

    The most annoying part of running OCS - the Open Creative Studio workflow this pack serves - is that it wants models you may not have, and hunting them down on Hugging Face by hand is a chore. Model Downloader fixes that by pulling files straight from the OCS model repo into whatever folder you name, right from inside the graph. It's less "node" and more "curl with a progress bar," and that's exactly right.

    It's part of the Open Creative Studio Nodes pack by alessandroperilli. The default URL points at the author's own Hugging Face repository (perilli/OCS_Models), which is where the workflow's models live.

    How it works

    It's a straightforward streaming HTTP download. Give it a url, a folder, and a filename; it creates the folder if it doesn't exist, downloads in 4MB chunks, and reports progress to ComfyUI's UI (via the progress event) when you're on a recent ComfyUI version. Two details show real-world care:

    • If the file already exists, it skips - no re-downloading, no error, it just returns the existing path. Idempotent in the way you want a downloader to be.
    • Partial downloads get cleaned up. If the connection dies mid-file, the .tmp file is deleted instead of leaving a corrupt half-download you'd trip over later.

    The token input is optional, a password field, and supports $VARNAME syntax to pull a secret from an environment variable instead of pasting it into your workflow. That's for private gated repos - the default OCS files are public.

    Inputs that matter

    • url - any direct download URL. The default is the FLUX VAE from OCS's repo, which is the file most OCS setups are missing.
    • folder - where the file lands. The default is your ComfyUI models directory. Absolute or relative; relative paths resolve against where ComfyUI runs, and ~/$VAR are expanded.
    • filename - what the file is called on disk. Keep the extension accurate - a .safetensors named .bin will confuse loaders.
    • token - optional; leave blank for public files.

    Outputs

    • FILE_PATH - the absolute path to the saved file. It's an output node, so this mostly serves as confirmation and as a way to tell the rest of the graph where the model landed.

    Install

    ComfyUI Manager → "Open Creative Studio Nodes" → install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/alessandroperilli/OCS_Nodes
    

    No extra dependencies - it uses requests, which ComfyUI already ships.

    Where people get burned

    • It only downloads the file, it doesn't wire it up. This node puts a model on disk. You still need a loader node (and the correct path) to actually use it. Don't expect a "models/mystery-file.safetensors" to become loadable until you point a loader at it.
    • Relative folders resolve relative to ComfyUI's working directory, not to your models folder. If in doubt, use an absolute path or the default.
    • The skip-if-exists behavior can hide problems. If a file exists but is corrupt or truncated from an earlier failed run, the node will cheerfully return it as "done." If a model misbehaves, delete the file and re-run.
    • HF rate limits are real. Batch-downloading a whole model suite in one go can hit Hugging Face's rate limits; space the big downloads out.
    CategoryOCS Nodes

    Inputs (4)

    NameTypeDefaultDescription
    urlSTRINGhttps://huggingface.co/perilli/OCS_Models/resolve/main/VAE/Image/flux1_vae.safetensors
    folderSTRING/tmp/ComfyUI/modelsTarget directory (created if missing). Absolute or relative.
    filenameSTRINGflux1_vae.safetensors
    tokenoptSTRINGOptional bearer token. Use $VARNAME to pull from environment.

    Outputs (1)

    NameTypeDescription
    FILE_PATHSTRING