ComfyUI Node

Kimi VL

The node that makes ComfyUI actually look at the picture

By Yuan-ManX·Created about a year ago·Updated about a year ago· 1
Kimi VL
  • model
  • processor
  • image
  • response
image_path
promptWhat is the dome building in the picture? Think step by step.
max_new_tokens512

ComfyUI is mostly a machine that makes images. Kimi VL is the rare node that makes it read them. It runs Moonshot AI's open-weight Kimi-VL - a Mixture-of-Experts vision-language model with 16B total parameters (only 3B active per token) and a 128K context window - entirely on your machine. No API key, no cloud call, no per-image bill. You hand it an image and a natural-language question, and it answers, in prose, about what's actually in the frame. That's a genuinely different capability than the CLIP interrogators and WD14 taggers you're used to, which hand back a list of tags. Kimi VL gives you a sentence - or a paragraph, or OCR'd text, or a step-by-step chain of reasoning.

This is the main node in the ComfyUI-Kimi-VL pack, and the one you'll actually spend your time on. The other three are plumbing - Load Kimi VL Model gets the weights in, Load Kimi VL Image hands this node a picture, Save Kimi VL Text writes the answer down.

How it runs

The node is a thin wrapper around the standard Hugging Face transformers generation loop. It takes the model and processor outputs from Load Kimi VL Model, builds a chat-style message (image plus your prompt), applies the model's chat template, feeds the image tensor through the processor, and calls model.generate(). Then it trims the generated tokens back to just the response and decodes it to a plain string.

Two things worth knowing about the mechanism:

  • The image_path input is required even though the image is passed in separately. The node uses that string when it constructs the chat message. You get it for free from Load Kimi VL Image, so just wire it through.
  • The first run downloads the model. Point Load Kimi VL Model at moonshotai/Kimi-VL-A3B-Instruct (the default) and ComfyUI will pull it from Hugging Face before inference starts. It's a 16B model - that's a big download and a serious chunk of VRAM. device_map="auto" means it'll spill to CPU when VRAM runs short, but "runs" and "runs fast" are different things; a 24GB-class card is the comfortable zone, and below that you're in patience territory.

The inputs that matter

Out of the required list, you really only touch two:

  • prompt - your question. The default is the model card's demo: "What is the dome building in the picture? Think step by step."
  • max_new_tokens - how long the answer can be, 1–2048, default 512. Bump it if you're asking for a long document transcription or a full caption.

That's it. The output is response, a STRING, which you wire into Save Kimi VL Text (to write it to a file or print it) or into any node that eats text.

Installing it

In ComfyUI Manager, search "Kimi" and install ComfyUI-Kimi-VL, or do it by hand:

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 ComfyUI. The requirements are modest for a model pack - torch, torchvision, transformers>=4.45.0, pillow, tiktoken, accelerate, blobfile - but note there's no flash-attn in there (more on that below), and the model itself isn't part of the install. The weights come down on first use.

Where people get burned

  • Flash attention is a trap if you haven't installed it. Load Kimi VL Model has an "enable" toggle for it, but flash-attn isn't in the requirements file. Enabling that toggle without the package installed will error out. Leave it on disable unless you've installed flash-attn yourself.
  • The temperature knob doesn't exist. The pack README dutifully recommends Temperature 0.6 for the Thinking model and 0.2 for Instruct - but this node exposes no sampling parameters at all. The advice is aspirational. You get whatever generate() does with defaults.
  • Instruct vs Thinking matters. Point the model path at the -Thinking variant for math-heavy reasoning; it's slower and meant for that. Instruct is the everyday perception-and-OCR workhorse.
  • It's real, but it's niche. Kimi-VL has a modest footprint in the ComfyUI community - most people reaching for a local captioner start with lighter options. This is the one you pick when you want an actual reasoning model in the graph, not just tags.

One more honest note: any custom node runs arbitrary Python on your machine, and this one pulls and executes model code from Hugging Face via trust_remote_code=True on first load. That's standard practice in this ecosystem, but it's exactly the kind of thing worth remembering before you install a pack you found on the internet.

CategoryKimi-VL

Inputs (6)

NameTypeDefaultDescription
modelKIMI_MODEL
processorKIMI_PROCESSOR
imagePIL_IMAGE
image_pathSTRING
promptSTRINGWhat is the dome building in the picture? Think step by step.
max_new_tokensINT5121–2048

Outputs (1)

NameTypeDescription
responseSTRING