Nodes/ComfyUI-Kimi-VL/Load Kimi VL Model
ComfyUI Node

Load Kimi VL Model

Where the 16B vision model actually gets into your graph

By Yuan-ManX·Created about a year ago·Updated about a year ago· 1
Load Kimi VL Model
    • model
    • processor
    model_pathmoonshotai/Kimi-VL-A3B-Instruct
    use_flash_attention

    The first node in every ComfyUI-Kimi-VL workflow, and the one that does the heavy lifting. Load Kimi VL Model pulls Moonshot AI's Kimi-VL - a 16B-parameter Mixture-of-Experts vision-language model - off Hugging Face and into your graph as a KIMI_MODEL and a KIMI_PROCESSOR. You can't do anything with the pack until this node has run, and it's also the node where the real memory and disk costs live. Everything after it is comparatively cheap.

    What it actually does

    It's a one-liner around transformers wrapped in a node. It calls AutoModelForCausalLM.from_pretrained() with trust_remote_code=True and device_map="auto", then AutoProcessor.from_pretrained() for the tokenizer/image processor. The two outputs - the model and its processor - are the KIMI_MODEL and KIMI_PROCESSOR inputs that the Kimi VL node expects. You don't use these outputs for anything else; they're pack-internal types.

    Two implementation details are worth knowing because they bite:

    • The model isn't installed with the pack - it's downloaded on first run. The default model_path, moonshotai/Kimi-VL-A3B-Instruct, is a Hugging Face repo id. The first time you queue this node, ComfyUI downloads the whole 16B model before anything else happens. Get a coffee. Make sure you have disk space.
    • device_map="auto" will quietly offload. If you don't have enough VRAM, parts of the model get shuffled to CPU and inference still runs - just slowly. This is a feature, but it's how people end up with a "stuck" Kimi node that's actually just swapping.

    The two inputs

    • model_path - the HF repo id. The two real choices are moonshotai/Kimi-VL-A3B-Instruct and moonshotai/Kimi-VL-A3B-Thinking. Instruct is the everyday one: perception, OCR, captioning, document and video understanding. Thinking trades speed for chain-of-thought reasoning, and the README suggests it when you actually need math-style reasoning. Switching models is just changing this string - the node doesn't care.
    • use_flash_attention - a disable/enable toggle. Disable is the safe default. The pack's requirements.txt doesn't include flash-attn, so if you flip this to enable without having installed flash-attn yourself, loading will fail. If you have installed it, enabling loads the model in bfloat16 with attn_implementation="flash_attention_2", which saves memory and speeds up generation - a real win on a 16B MoE, but it's on you to install the dependency.

    Installing it

    Same pack-level install for the whole family: ComfyUI Manager, search "Kimi", install ComfyUI-Kimi-VL; or

    cd ComfyUI/custom_nodes
    git clone https://github.com/Yuan-ManX/ComfyUI-Kimi-VL.git
    cd ComfyUI-Kimi-VL
    pip install -r requirements.txt
    

    then restart. The requirements - torch, torchvision, transformers>=4.45.0, pillow, tiktoken, accelerate, blobfile - are what actually get installed; the weights come separately on first load.

    Gotchas

    • The first load fetches a big model. On a slow connection this node looks "hung" for a long time; it isn't, it's downloading.
    • There's no way to pre-convert or quantize the model here. It loads in bf16 by default (flash-attn path) or in the repo's own dtype. If you need a small-footprint Kimi, this node isn't the tool - you'd look at quantized runs outside ComfyUI and hand the text back in.
    • trust_remote_code=True is worth a moment of awareness: loading executes code shipped in the Hugging Face repo. That's how every transformers model in this class works, and it's a good reminder of why you install custom nodes - and the models they load - from sources you actually trust.
    CategoryKimi-VL

    Inputs (2)

    NameTypeDefaultDescription
    model_pathSTRINGmoonshotai/Kimi-VL-A3B-Instruct
    use_flash_attentionCOMBO2 options: disable, enable

    Outputs (2)

    NameTypeDescription
    modelKIMI_MODEL
    processorKIMI_PROCESSOR