😶🌫️llama图片反推@炮老师的小课堂
Local image captioning that doesn't call home
- 🖼️图像1
- 🖼️图像2
- 🖼️图像3
- 🖼️图像4
- 🖼️图像5
- 🖼️图像6
- 🖼️图像7
- 🖼️图像8
- 🍭反推额外选项
- 💬反推文本
- 📋完整对话历史
- 🔢使用的种子
If Dapao_LlamaChat is the general-purpose hammer, this is the dedicated screwdriver. Dapao_LlamaCaption ("llama图片反推" - llama image reverse-prompt) takes 1–8 images and writes a text description or prompt for them, entirely on your own GPU through llama.cpp. Same inference core as the chat node, but pointed at one job: look at the image, describe it. The pack credits its lineage to lihaoyun6's ComfyUI-llama-cpp_vlm, and it's the node you'd reach for when you want a VLM as a captioner inside ComfyUI rather than a separate tool.
The KB's LLM-in-ComfyUI essay splits captioners into two camps: natural-language describers for LLM-encoded bases and tag engines for the anime lineage. This node is firmly in the first camp - it writes sentences, not 1girl, red dress booru tags. For a Flux-class or Qwen-encoded base that's exactly what you want; for a Pony/Illustrious dataset you'd pair it with a tagger (the community standard is WD14) rather than use it alone.
How it works
The node reuses the chat node's model-loading plumbing, so you get the same dropdowns: model GGUF, chat handler, mmproj for vision, context length, VRAM budget, image min/max tokens, sampling, thinking mode, and the Qwen3.8 reasoning-strength control. Where it diverges is the 🎨提示词风格 menu. Styles are loaded dynamically from the prompt/ folder inside the pack - shipped examples include 简单, 详细, 标签, 电影质感, JSON, and a 12-dimension "极致强化" style. Drop a new .txt file into that folder (filename becomes the style name, content is the instruction) and it appears in the dropdown after a refresh. That's a genuinely nice extensibility touch.
The 💬附加指令 box overrides the built-in style when filled - author's own framing: extra instructions appended on top of the style prompt. So if you want every caption to end with "product on white background," type it there once.
Inputs that matter
🎨提示词风格- the caption meta-instruction; swap it to change what the model emphasizes.💬附加指令- override/addition for one-off requirements.🖼️图像1through🖼️图像8- optional IMAGE inputs; 1–8 images, batch-able.🍭反推额外选项- optionalLLAMA_CAPTION_OPTIONSpipe from the companionDapao_LlamaCaptionOptionsnode for fine control (person info, lighting, camera angle, and so on).- Outputs:
💬反推文本(the caption - wire this into a prompt box, a text encode, or a save node),📋完整对话历史, and🔢使用的种子.
Using it in a real workflow
Two classic jobs: seeding img2img or image-to-video from a reference frame (caption → enhancer → sampler, the pattern the KB calls jobs 1 and 2 composed), and building a LoRA training set. One honest caveat from the KB applies here as much as to JoyCaption: every VLM struggles with multi-subject attribution - who's wearing what when two people are in frame. Auto-caption a big set with this and eyeball the small one.
Installing it
Same pack, same story as the rest: paolaoshi/ComfyUI-llama_Dapao via ComfyUI Manager or
cd ComfyUI/custom_nodes
git clone https://github.com/paolaoshi/ComfyUI-llama_Dapao
then pip install -r requirements.txt and restart. The dependency gotcha is pack-wide: llama-cpp-python comes from the JamePeng fork at a pinned 0.3.47+ commit (stock PyPI 0.3.35 fails on Qwen3.8 GGUFs), and NVIDIA users should overlay a matching GPU wheel from the JamePeng releases. GGUF + mmproj go in ComfyUI/models/LLM/ - if the style list loads but the model dropdown is empty, that's where to look.
Inputs (28)
| Name | Type | Default | Description |
|---|---|---|---|
| 🤖模型文件 | COMBO | 0 options: | |
| 🔌对话处理器 | COMBO | None | 22 options: None, LLaVA-1.5, LLaVA-1.6, Moondream2, nanoLLaVA, llama3-Vision-Alpha, +16 |
| 🖼️mmproj文件 | COMBO | None | 1 options: None |
| 📐上下文长度 | INT | 8192512–131072 | — |
| 💾显存限制(GB) | FLOAT | -1.0-1–999 | — |
| 🔢图像最小token | INT | 2561–4096 | — |
| 🔢图像最大token | INT | 13441–8192 | — |
| 🎨提示词风格 | COMBO | 6 options: 提示词风格 - JSON, 提示词风格 - 标签, 提示词风格 - 电影质感, 提示词风格 - 简单, 提示词风格 - 详细, 提示词风格-12维度极致强化 | |
| 💬附加指令 | STRING | 在风格提示词基础上追加的额外指令(可留空) | |
| 📏图像最大边长 | INT | 112064–4096 | — |
| 🎲随机种子 | INT | 00–18446744073709550000 | — |
| 📊最大输出token | INT | 10241–32768 | — |
| 🌡️温度 | FLOAT | 0.300–2 | — |
| 🎯top_p | FLOAT | 0.900–1 | — |
| 🔝top_k | INT | 400–200 | — |
| 🔁重复惩罚 | FLOAT | 1.100–2 | — |
| 🧠思考模式 | BOOLEAN | false | — |
| 🧠Qwen3.8推理强度 | COMBO | 关闭 | 仅 Qwen3.8 生效;关闭=不思考,自动/高=模型最高档,低/中等=降低思考强度。 |
| ⚡推理后卸载模型 | BOOLEAN | false | — |
| 🖼️图像1opt | IMAGE | — | |
| 🖼️图像2opt | IMAGE | — | |
| 🖼️图像3opt | IMAGE | — | |
| 🖼️图像4opt | IMAGE | — | |
| 🖼️图像5opt | IMAGE | — | |
| 🖼️图像6opt | IMAGE | — | |
| 🖼️图像7opt | IMAGE | — | |
| 🖼️图像8opt | IMAGE | — | |
| 🍭反推额外选项opt | LLAMA_CAPTION_OPTIONS | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| 💬反推文本 | STRING | — |
| 📋完整对话历史 | STRING | — |
| 🔢使用的种子 | INT | — |