🏷️ Caption Prompt Builder
A captioning instruction your VLM will actually obey (and your dataset will thank you)
- prompt
Captioning is where every VLM workflow either earns its keep or quietly produces garbage captions that poison a training run. Caption Prompt Builder is the part of this pack that turns "describe this image" into an instruction a Qwen2.5-VL will follow on the first try. It's a pure string builder - no model loading, no API calls - so it's the easiest node in the pack to understand, and it's worth wiring into any caption pipeline you plan to reuse.
The name is accurate: it builds a captioning prompt for you. Instead of typing "describe this image in detail" and hoping, you get a structured instruction in Chinese or English that tells the model exactly what level of detail you want and what to do with visible text (transcribe it, don't hallucinate). That last bit matters - VLM captioners love to invent details that aren't in the frame, and the built-in template explicitly tells the model not to guess at unseeable information.
What you actually set
Three inputs, all simple:
- style - the personality of the caption.
详细(detailed) is the default and gives subject, environment, composition, color, lighting, material, style, and text.简洁(concise) is one sentence.标签(tags) forces comma-separated booru-style tags,电商(e-commerce) frames it for product listings, and数据集(dataset) is the one you want for training: stable, objective, reproducible captions. - language - 中文, English, 日本語, or 한국어. Handy if you're captioning a dataset for a community that works in another language.
- domain - free text like "anime illustration" or "product photography" that slots into the prompt so the model frames its description correctly.
The output is a single prompt STRING. You wire it into the custom_prompt input of Remote VLM Business Task or V2 Remote Vision Analysis, or paste it into any other VLM node you have. Because the templates live in utils/business_prompts.py, you can also read exactly what each style produces before you commit to it.
Where this earns its keep
If you're captioning a dataset, the 数据集 and 标签 styles are the difference between a caption set you can actually train on and one you'll redo. Training caption quality is a real lever - messy, inconsistent captions are a classic way to waste a training run. Consistency is the whole point of the dataset style: the model gets told the same rules every time, so your captions don't drift from "detailed" to "vague" halfway through a few thousand images.
The one trap: the enum labels are Chinese by default. You don't need to read Chinese to use it, but you do need to know 详细 is "detailed" and 标签 is "tags", so maybe screenshot this before you forget.
Install
The whole pack installs at once:
cd ComfyUI/custom_nodes
git clone https://github.com/walke2019/ComfyUI-GGUF-VLM.git
cd ComfyUI-GGUF-VLM
pip install -r requirements.txt
Restart ComfyUI, and the builder shows up under GGUF-VLM → 🚀 Business. ComfyUI Manager works too if you search the pack title. The heavy lifting (llama-cpp-python, transformers) is only needed by the model-loading nodes - this one is harmless on its own.
Troubleshooting
Since this node only outputs a string, the failure mode is "the caption ignores my style." That's almost always the model, not the builder: VLM captioners have their own ideas about detail level, and a quantized model (Q4, say) will flatten your careful instruction. If your captions come back sloppy, either bump the model to Q8 (which for vision models is basically fp16 at half the size, per the general GGUF rule of thumb) or feed the output through a stronger remote model. And if you need your captions to play nice with a specific tag vocabulary, the KB's advice on training prompts applies here: be explicit that you want comma-separated booru tags rather than sentences, because that's the one instruction captioners routinely ignore.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| style | COMBO | 详细 | 5 options: 详细, 简洁, 标签, 电商, 数据集 |
| language | COMBO | 中文 | 4 options: 中文, English, 日本語, 한국어 |
| domain | STRING | 通用 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |