Nodes/ComfyUI-Ovis2/Load Ovis2 Model
ComfyUI Node

Load Ovis2 Model

One node, a 16–70GB first run, and the whole pack behind it

By Andro-Meta·Created about a year ago·Updated about a year ago· 4
Load Ovis2 Model
    • model
    model_nameAIDC-AI/Ovis2-8B
    precisionbfloat16
    max_token_length32768
    devicecuda
    auto_downloadenable

    Every node in this pack is useless until this one does its thing. Load Ovis2 Model (class Ovis2ModelLoader) is the gatekeeper: it pulls an Ovis2 vision-language model into memory and hands it to the caption, multi-image, and video nodes as an OVIS2_MODEL connection. Nothing else in the pack starts without it, so it's the node you'll actually spend time on - mostly waiting.

    Ovis2 comes from AIDC-AI, an Alibaba research group, and it's the model the r/comfyui crowd kept begging someone to port after it showed up in early 2025. It's not a diffusion model; it's a multimodal LLM that looks at images (and sequences of them) and writes about what it sees - unusually good at describing where things are in a frame and at reading text. That's the whole pitch of this pack, and this node is the download.

    How it works

    Under the hood it's a plain AutoModelForCausalLM.from_pretrained call from the transformers library, with trust_remote_code=True because Ovis2's architecture lives in the model repo itself. The max_token_length input isn't just decoration - it maps to multimodal_max_length, the context window that has to hold the image tokens plus your prompt plus the reply. Bump it up for multi-image work; the default of 32768 is a fine starting point.

    The auto_download toggle (default "enable") is the interesting part. On first run with a model you don't have yet, the node calls snapshot_download from huggingface_hub and pulls the entire Hugging Face repo into ComfyUI/models/ovis/ - that's why the first run is huge. After that it loads from disk and never phones home. Set it to "disable" if you want to force it to use whatever's already sitting in that folder.

    The inputs that matter

    • model_name - a fixed dropdown of the five full-precision sizes: Ovis2-1B, 2B, 8B (default), 16B, 34B. Watch the VRAM math: 8B in bf16 is roughly 16GB of weights, 16B is 30GB+, 34B is 70GB+. There is no quantization here, so if your card has 8GB of VRAM this pack is probably not for you.
    • precision - bfloat16 by default, which is right on any Ampere-or-newer card. Drop to float16 if bf16 gives you trouble; float32 is for CPUs and people with too much patience.
    • device - cuda default; cpu exists but Ovis2 on CPU is a "go make tea" proposition even at 1B.
    • auto_download - leave enabled unless you manage model files yourself.

    The single output, model (OVIS2_MODEL), wires straight into any of the three analysis nodes' model input.

    Installing it

    Same story for the whole pack - ComfyUI Manager is the easy path: search "Ovis2" in the custom nodes tab, or use "Install from Git URL" with https://github.com/Andro-Meta/ComfyUI-Ovis2. Manual install works too:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Andro-Meta/ComfyUI-Ovis2
    pip install -r ComfyUI-Ovis2/requirements.txt
    

    Then restart ComfyUI. The requirements pin transformers>=4.46.2, torch>=2.4.0, and flash-attn>=2.7.0 - but here's a genuinely useful quirk: the node code never actually imports flash-attn. It's declared, not required, which is a relief on Windows where building it is a known headache. If flash-attn fails to install, the pack usually still runs.

    Common gotchas

    • CUDA out of memory - the README's own advice: smaller model, float16, shorter max_token_length. Shrink the image before feeding it if you're still hurting.
    • A flaky first download - a 16–70GB snapshot can die mid-transfer. The node checks for config.json as a sign the model landed; if it's missing, delete the partial folder in models/ovis and let it retry.
    • The quants aren't there - the community asked for INT4/INT8 Ovis2 builds and AIDC-AI shipped them, but this loader's dropdown is fixed to the five full-precision sizes. You'd have to edit the node's source to load a quant, which is worth knowing before you expect one.
    • Trust it only as far as you can read it - this is an auto-downloading, trust_remote_code pack, which is exactly the class of node the ComfyUI ecosystem's LLMVISION incident taught people to be careful with. The codebase is one small, readable file; skim it once before you point it at a model repo. It's clean, and knowing that is worth more than any checklist.
    CategoryOvis2

    Inputs (5)

    NameTypeDefaultDescription
    model_nameCOMBOAIDC-AI/Ovis2-8B5 options: AIDC-AI/Ovis2-34B, AIDC-AI/Ovis2-16B, AIDC-AI/Ovis2-8B, AIDC-AI/Ovis2-2B, AIDC-AI/Ovis2-1B
    precisionCOMBObfloat163 options: bfloat16, float16, float32
    max_token_lengthINT327682048–65536
    deviceCOMBOcuda2 options: cuda, cpu
    auto_downloadCOMBOenable2 options: enable, disable

    Outputs (1)

    NameTypeDescription
    modelOVIS2_MODEL