Nodes/ComfyUI-MiniCPM-Plus/MiniCPM-Plus: V-2.6_Int4
ComfyUI Node

MiniCPM-Plus: V-2.6_Int4

The vision-language captioner that fits on a mid-range card

By CY-CHENYUE·Created 2 years ago·Updated 2 years ago· 25
MiniCPM-Plus: V-2.6_Int4
  • image
  • responseText
  • keywordsText
max_new_tokens300
temperature0.5
top_p0.8
top_k50
seed0
extract_keywordsfalse
user_promptA
user_promptB

Same brain, 7GB of VRAM

This is the MiniCPM_V_2_6 you've already read about, but the model file is INT4-quantized - the README quotes roughly 7GB of VRAM instead of the full-precision model's demands. Same node, same inputs, same outputs, same workflow. The only real question is which one your card can hold, and for mid-range GPUs the answer is this one.

The use case doesn't change: feed it an image, get back a natural-language description you can wire straight into a CLIP Text Encode. Prompt reverse for Flux, captioning for datasets, "tell me what's in this picture" for everything else. It's bilingual, it handles arbitrary images, and like the full model it can work with no image at all if you just want to ask it a question.

How it works

Identical machinery to MiniCPM_V_2_6. It pulls openbmb/MiniCPM-V-2_6-int4 into ComfyUI/models/MiniCPM/ on first run, converts the IMAGE tensor to a plain image, and runs the model's chat() with your settings.

The inputs that matter:

  • image (optional) - what it looks at
  • user_promptA / user_promptB - your instruction, plus an optional example answer that shapes the output
  • extract_keywords - flip it on and a second generation produces a comma-separated tag list on keywordsText, handy for SDXL or anime checkpoints

Outputs are responseText (the description - wire this into your text encoder) and keywordsText (tags, empty unless the toggle is on). Sampling knobs are max_new_tokens (default 300), temperature (0.5), top_p (0.8), top_k (50), and a seed that actually seeds when nonzero.

The one honest caveat

The full-precision node explicitly moves its model onto CUDA with .cuda(). This int4 handler loads without an explicit device move, so if your captioning feels oddly slow, that's the first thing to suspect - check where the model actually ended up. If it runs fine, great, and for most people on 8GB cards it will; just don't be surprised if you occasionally need a restart to settle it down. In fact this node's own dependency check logs exactly that: after it installs anything, it tells you to restart ComfyUI for the change to take effect. Trust that message.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/CY-CHENYUE/ComfyUI-MiniCPM-Plus

Or ComfyUI Manager → search "MiniCPM-Plus" → Install, then restart. First run is the slow one: heavy pip installs (transformers, accelerate, bitsandbytes, optimum, …) plus a multi-GB model download into ComfyUI/models/MiniCPM/. Patience, stable network, and if a download dies midway you can pre-pull the weights to that same folder yourself.

CategoryMiniCPM

Inputs (9)

NameTypeDefaultDescription
max_new_tokensINT3001–3000
temperatureFLOAT0.50.1–2
top_pFLOAT0.80.1–1
top_kINT501–1000
seedINT00–18446744073709550000
extract_keywordsBOOLEANfalse
imageoptIMAGE
user_promptAoptSTRING
user_promptBoptSTRING

Outputs (2)

NameTypeDescription
responseTextSTRING
keywordsTextSTRING