Ovis2 Image Caption
The SOTA-ish captioner ComfyUI kept asking for
- model
- image
- caption
This is the node most people install this pack for. Ovis2 Image Caption (Ovis2ImageCaption) feeds one image to an Ovis2 vision-language model and gets back a natural-language description - the kind of caption you actually want when you're building a LoRA training set, not the tag soup a WD14 tagger spits out. And it's genuinely good at it: when Ovis2 hit Hugging Face in March 2025, the early reports on r/StableDiffusion were calling it better than Florence and arguing it understood where things are in an image better than JoyCaption. People started a thread on r/comfyui asking for a port - and this pack is literally the author's answer to that thread.
If you're captioning for training, that's the pitch in one line: short natural sentences with real spatial detail ("the red mug is on the shelf to the left of the lamp") beat keyword lists for modern LLM-encoded models, and the KB's own LoRA guidance says natural-language captioning is the gold standard over BLIP-style tags.
How it works
The node takes the ComfyUI IMAGE tensor, converts it back to a PIL image, and builds a query that looks like <image>\n{prompt}. That goes into Ovis2's preprocess_inputs (which chops the image into up to nine partitions so small details survive), then into generate with sampling on, top_p=0.9, and your temperature. The model's reply is decoded and the instruction prefix stripped - you get the caption and nothing else on the output wire.
Inputs that matter
- model - the
OVIS2_MODELoutput from Load Ovis2 Model. Non-negotiable. - image - any
IMAGEyou like: a Load Image node, the output of another node that produces frames. - prompt - freeform instructions, default "Describe this image in detail." This is your real control surface. Ask for "a detailed caption suitable for training data" or "read all the text in this image" and you'll get very different output, because Ovis2 is a strong OCR reader too.
- max_new_tokens - cap on the reply length, 64 to 2048, default 512. Bump it if captions keep getting cut off.
- temperature - 0.1 to 1.0, default 0.7. Lower it toward 0.2 if you want deterministic captions for a dataset, where every rerun should agree.
The single output, caption (a STRING), plugs into anything that accepts text - a Save Text node, a text display widget, a node that feeds captions into prompt conditioning.
Installing
Part of the ComfyUI-Ovis2 pack: ComfyUI Manager → search "Ovis2" (or "Install from Git URL" → https://github.com/Andro-Meta/ComfyUI-Ovis2), or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/Andro-Meta/ComfyUI-Ovis2
pip install -r ComfyUI-Ovis2/requirements.txt
Restart, then add a Load Ovis2 Model node first - it has to fetch the model (multi-gigabyte first download to models/ovis/) before this node will do anything.
Common gotchas
- It only captions the first image in a batch. If you feed it a batch of 20 frames, it silently uses frame 0 and ignores the rest. There's no loop here, so batch-caption a folder by running it one image at a time (or string a loop around it). This trips up basically everyone on first use.
- Errors come back as the output text. The node catches exceptions and returns "Error generating caption: …" as a string, not a hard failure. If your "captions" suddenly look like error messages, that's the tell - check the console for the real traceback.
- It has opinions about NSFW. Ovis2 is somewhat censored; the community consensus from the same threads that praised it is that JoyCaption handles explicit content better, while Ovis2 wins on spatial understanding and detail placement. Pick your captioner based on what your dataset actually contains.
- It's slow and it eats VRAM. You're running a real LLM, not a lightweight tagger. At 8B that's ~16GB of weights before you even process an image; leave a comfortable gap in VRAM or drop to the 2B/1B models for quick jobs.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| model | OVIS2_MODEL | — | |
| image | IMAGE | — | |
| prompt | STRING | Describe this image in detail. | — |
| max_new_tokens | INT | 51264–2048 | — |
| temperature | FLOAT | 0.70.1–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| caption | STRING | — |