Nodes/ComfyUI-MiniCPM/MiniCPM-V GGUF (Advanced)
ComfyUI Node

MiniCPM-V GGUF (Advanced)

Full captioning control that still fits in 4–6GB

By 1038lab·Created about a year ago·Updated 12 months ago· 154
MiniCPM-V GGUF (Advanced)
  • image
  • video
  • PROMPT
  • STRING
â—„modelMiniCPM-V-4 (Q4_0)â–ş
â—„preset_promptDescribeâ–ş
â—„custom_promptâ–ş
â—„system_promptYou are MiniCPM-V, a helpful, concise and knowledgeable vision-language assistant. Answer directly and stay on task.â–ş
â—„max_new_tokens1024â–ş
â—„temperature0.70â–ş
â—„top_p0.90â–ş
â—„top_k100â–ş
â—„repetition_penalty1.10â–ş
â—„video_max_num_frames64â–ş
â—„video_max_slice_nums2â–ş
â—„deviceAutoâ–ş
â—„memory_managementKeep in Memoryâ–ş
â—„seed0â–ş

Same idea as the pack's transformers Advanced node, with one crucial difference: this one loads the model as a GGUF quant, which is how you get a real vision-language captioner onto a 4–6GB card. MiniCPM-V GGUF (Advanced) gives you every sampling knob the transformers version has, minus the VRAM bill. If you're on 8GB or more and caption quality is the point, skip straight to the transformers node; if your GPU is small, this is the one.

How it works

Instead of Transformers, this node drives llama-cpp-python - the llama.cpp binding - with a Llava15ChatHandler and the model's mmproj vision projector. The image gets resized to 336Ă—336, base64-encoded, and sent to the model as a chat completion. Offload is all-or-nothing: device = GPU puts every layer on the card (n_gpu_layers = -1), CPU offloads none. The model file (a GGUF) plus the projector (a separate f16 GGUF) auto-download into ComfyUI/models/LLM/GGUF on first run.

The catch to understand before you commit: only MiniCPM-V-4.0 has GGUF support right now. V4.5 GGUF support landed in llama.cpp on Aug 26, 2025 (PR #15575), but llama-cpp-python releases lag it - the node even throws a specific error telling you your build was compiled before that fix. Until your llama-cpp-python ships it, the 4.5 GGUF model simply isn't available. Use v4.0 GGUF, or the transformers nodes for 4.5.

The inputs that matter

  • model - 10 quantization levels of MiniCPM-V-4, from Q4_0 (~2.08GB) to Q8_0 (~3.83GB). These are all the same model, just different fidelity/size. Q4_K_M (~2.19GB) is the one the README recommends as the quality/size balance - and note the default is plain Q4_0, which is the slightly worse non-K quant. Q8_0 is basically fp16 at half the size; if your card fits it, just use it.
  • Everything else matches the transformers Advanced node: preset_prompt (21 choices), custom_prompt (wins when non-empty), system_prompt, max_new_tokens, temperature/top_p/top_k/repetition_penalty, device, memory_management, seed, plus video_max_num_frames.

One honest caveat on video: the node accepts a video input and samples frames, but the GGUF path only captions the first sampled frame - it's a poster-frame captioner, not a video analyzer. For real multi-frame video, use the transformers node.

Outputs

Two strings, same trap as the transformers version. PROMPT is the composed prompt that was sent, STRING is the model's answer. Wire STRING into a text display or a caption saver.

Installing - this is the part people get burned on

requirements.txt does not install llama-cpp-python - it's commented out as optional. If it's missing, the GGUF nodes don't even appear in your menu. Run the pack's helper:

cd ComfyUI/custom_nodes/ComfyUI-MiniCPM
python llama_cpp_install.py

That script detects your GPU and compiles llama-cpp-python from source with CUDA - which on Windows portable means Visual Studio Build Tools and the CUDA Toolkit installed first (the pack ships a guide for exactly this in llama_cpp_install/). It's the fiddliest install in this pack, so if you only want the transformers nodes, skip it entirely. Also note: the README flags that llama-cpp-python compatibility is the reason 4.5 GGUF is temporarily unavailable - keep it updated and re-run the script after llama.cpp releases move.

Category🧪AILab/📝MiniCPM

Inputs (16)

NameTypeDefaultDescription
imageoptIMAGE—
videooptVIDEO—
modeloptCOMBOMiniCPM-V-4 (Q4_0)10 options: MiniCPM-V-4 (Q4_0), MiniCPM-V-4 (Q4_1), MiniCPM-V-4 (Q4_K_M), MiniCPM-V-4 (Q4_K_S), MiniCPM-V-4 (Q5_0), MiniCPM-V-4 (Q5_1), +4
preset_promptoptCOMBODescribe21 options: Describe, Caption, Analyze, Identify, Explain, List, +15
custom_promptoptSTRING—
system_promptoptSTRINGYou are MiniCPM-V, a helpful, concise and knowledgeable vision-language assistant. Answer directly and stay on task.—
max_new_tokensoptINT10241–4096—
temperatureoptFLOAT0.700–2—
top_poptFLOAT0.900–1—
top_koptINT1000–200—
repetition_penaltyoptFLOAT1.100.8–1.5—
video_max_num_framesoptINT641–128—
video_max_slice_numsoptINT21–4—
deviceoptCOMBOAuto3 options: Auto, GPU, CPU
memory_managementoptCOMBOKeep in Memory3 options: Keep in Memory, Clear After Run, Global Cache
seedoptINT00–18446744073709550000—

Outputs (2)

NameTypeDescription
PROMPTSTRING—
STRINGSTRING—