MiniCPM-Plus: 3-4B-GPTQ-Int4
The same prompt-writing LLM, at a fraction of the VRAM
- STRING
The cheap seat is the sensible seat
If you've landed here you've probably already met this node's big sibling, MiniCPM3_4B. Same pack, same interface, same job - but the model file has been GPTQ-quantized down to roughly 4 bits per weight, so it wants a fraction of the memory. That's the whole pitch: you keep the local prompt-writing LLM, and you leave enough VRAM for the diffusion model that's doing the actual work.
For a text-generation helper, that trade is nearly free. A prompt doesn't need the last 2% of model fidelity, and MiniCPM3 is a 4B model to begin with - the int4 weights come in around 3-4GB against ~8GB for fp16. On an 8GB card, this is the difference between running it and not.
How it works
Same machinery as the full node. The pack downloads openbmb/MiniCPM3-4B-GPTQ-Int4 into ComfyUI/models/MiniCPM/ on first run, wraps your instruction in a chat template, and runs a standard transformers generation. Two optional multiline prompts (user_promptA + user_promptB) join into one instruction; max_new_tokens (default 300), temperature (0.5), top_p (0.8), and top_k (50) control the output. One STRING comes back - wire it into a CLIP Text Encode and let it draft prompts for Flux, SDXL, or whatever's on your sampler.
Two source-level details worth knowing:
- Like its fp16 twin, it accepts a
seedbut never uses it. Text output isn't reproducible from this node. - The GPTQ node wraps generation in a NaN-guard that clamps the output scores, so it survives edge cases that make the full node throw an error instead of an answer. Not a headline feature, but nice when you're hammering it with long
max_new_tokensvalues.
Which one do I pick?
Honest answer: the int4. If you have a huge card and very particular taste for full precision, the fp16 node is there and it's fine. But for writing prompts, the int4 is the one most people should run - smaller download, more headroom, and the quality delta is genuinely hard to spot in practice.
Install and gotchas
One install for the whole pack:
cd ComfyUI/custom_nodes
git clone https://github.com/CY-CHENYUE/ComfyUI-MiniCPM-Plus
Or search "MiniCPM-Plus" in ComfyUI Manager and restart ComfyUI.
The shared pack gotchas apply in full force here. First run auto-installs heavy dependencies - transformers, accelerate, bitsandbytes, optimum, and auto-gptq, and the GPTQ-specific ones are the finicky ones on some Python/CUDA combos - then downloads the model. Both take a while; don't judge it by the first run. The auto-installer writes into your shared Python environment, so if an unrelated node breaks right after, that's the likely culprit. And as always with this pack, pre-downloading the weights into ComfyUI/models/MiniCPM/ is the escape hatch when a download fails.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| max_new_tokens | INT | 3001–3000 | — |
| temperature | FLOAT | 0.50.1–2 | — |
| top_p | FLOAT | 0.80.1–1 | — |
| top_k | INT | 501–1000 | — |
| seed | INT | 00–18446744073709550000 | — |
| user_promptAopt | STRING | — | |
| user_promptBopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |