Nodes/ComfyUI Ino Nodes/Ino Civitai Download Model
ComfyUI Node

Ino Civitai Download Model

Download models from Civitai inside the graph, and wire the path straight in

By nobandegani·Created about a year ago·Updated 2 months ago· 6
Ino Civitai Download Model
    • success
    • msg
    • model_type
    • abs_path
    • rel_path
    enabledtrue
    model_config{}
    model_type
    model_subfolderflux1dev
    model_version
    token
    model_id
    file_id0
    chunk_size

    Most of us download a model from Civitai in the browser, then hunt through folders in ComfyUI. Ino Civitai Download Model flips that: the download is the node, and it hands you back the abs_path of the file it just saved - which you can wire straight into a loader node. It's part of the Ino pack's model-management layer, where a workflow can bootstrap itself: fetch the model, load it, generate, all from one run. No manual step in the middle.

    The important framing: this node takes a download config, not a URL. The config is a JSON string describing the model - which Civitai model, which version, which file - and you can get it from the pack's config nodes (like Ino Get Controlnet Download Config) or hand it in. That's what makes the layer composable: same shape of config drives the HuggingFace, Civitai, and S3 download nodes, so one workflow can pull from different hosts without rewiring.

    How it works

    It resolves the config into a Civitai model/version/file id, targets ComfyUI/models/<model_type>/<subfolder> as the destination, and downloads with the pack's Civitai client (async, chunked - the chunk_size combo of 8/16/32/64 MB controls download chunk size). Then it returns success, a message, the model type, and both absolute and relative paths.

    Two behaviors from the source worth knowing. First, a model_config JSON overrides the individual model_type/model_subfolder/model_version/model_id fields where present - so if you feed a config in, the loose fields become fallbacks. Second, the token input is overridden by the CIVITAI_TOKEN environment variable if it's set. The code just reads the env var over the field. So if you set the env var globally (as the README suggests), the token field on the node does nothing - that's by design, but it's a common source of "why is my token being ignored."

    Inputs and outputs that matter

    • model_config - JSON string; the clean way to drive it.
    • model_type - combo (diffusion_models, loras, controlnet, ...), decides the destination folder.
    • model_subfolder - subdirectory under the model type (default flux1dev).
    • model_version / model_id / file_id - used when not supplied by config.
    • token - Civitai API token; needed for gated/private models, overridden by the env var.

    Outputs: success, msg, model_type, abs_path, rel_path - the path outputs are the ones you'll wire into loaders.

    Installing it

    Part of ComfyUI-InoNodes (Inoland). ComfyUI Manager → search "ComfyUI Ino Nodes" → install → restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/nobandegani/comfyui_ino_nodes
    cd comfyui_ino_nodes
    pip install -r requirements.txt
    

    Restart after. Requires inopyutils (auto-installed). For gated downloads set CIVITAI_TOKEN as an environment variable.

    Common issues

    The env-var-overrides-field behavior is the #1 confusion - if a gated model 401s and you did put a token in the field, check whether CIVITAI_TOKEN is set somewhere (it wins). Next, a model file is big and this is a real download: large files take a while, and a timeout mid-download leaves a partial file - the chunked download exists to help, but a flaky connection can still land you a corrupt safetensors. And remember it downloads to models/<model_type>/<subfolder>, so a typo in model_subfolder (default flux1dev) drops the file somewhere unexpected; the returned abs_path tells you exactly where it went, which is why you should wire it rather than guess.

    CategoryInoModelHelper

    Inputs (9)

    NameTypeDefaultDescription
    enabledBOOLEANtrue
    model_configSTRING{}
    model_typeCOMBO32 options: audio_encoders, checkpoints, clip, clip_vision, controlnet, detection, +26
    model_subfolderSTRINGflux1dev
    model_versionSTRING
    tokenoptSTRING
    model_idoptSTRING
    file_idoptINT00–100
    chunk_sizeoptCOMBO4 options: 8, 16, 32, 64

    Outputs (5)

    NameTypeDescription
    successBOOLEAN
    msgSTRING
    model_typeSTRING
    abs_pathSTRING
    rel_pathSTRING