Nodes/ComfyUI-MiniCPM-Plus/MiniCPM-Plus: 3-4B-GPTQ-Int4
ComfyUI Node

MiniCPM-Plus: 3-4B-GPTQ-Int4

The same prompt-writing LLM, at a fraction of the VRAM

By CY-CHENYUE·Created 2 years ago·Updated 2 years ago· 25
MiniCPM-Plus: 3-4B-GPTQ-Int4
    • STRING
    max_new_tokens300
    temperature0.5
    top_p0.8
    top_k50
    seed0
    user_promptA
    user_promptB

    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 seed but 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_tokens values.

    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.

    CategoryMiniCPM

    Inputs (7)

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

    Outputs (1)

    NameTypeDescription
    STRINGSTRING