Nodes/ComfyUI-llama_Dapao/😶‍🌫️llama图片反推@炮老师的小课堂
ComfyUI Node

😶‍🌫️llama图片反推@炮老师的小课堂

Local image captioning that doesn't call home

By paolaoshi·Created 4 months ago·Updated 2 days ago· 44
😶‍🌫️llama图片反推@炮老师的小课堂
  • 🖼️图像1
  • 🖼️图像2
  • 🖼️图像3
  • 🖼️图像4
  • 🖼️图像5
  • 🖼️图像6
  • 🖼️图像7
  • 🖼️图像8
  • 🍭反推额外选项
  • 💬反推文本
  • 📋完整对话历史
  • 🔢使用的种子
🤖模型文件
🔌对话处理器None
🖼️mmproj文件None
📐上下文长度8192
💾显存限制(GB)-1.0
🔢图像最小token256
🔢图像最大token1344
🎨提示词风格
💬附加指令
📏图像最大边长1120
🎲随机种子0
📊最大输出token1024
🌡️温度0.30
🎯top_p0.90
🔝top_k40
🔁重复惩罚1.10
🧠思考模式false
🧠Qwen3.8推理强度关闭
⚡推理后卸载模型false

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.
  • 🖼️图像1 through 🖼️图像8 - optional IMAGE inputs; 1–8 images, batch-able.
  • 🍭反推额外选项 - optional LLAMA_CAPTION_OPTIONS pipe from the companion Dapao_LlamaCaptionOptions node 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.

Category🍭大炮-llama-cpp

Inputs (28)

NameTypeDefaultDescription
🤖模型文件COMBO0 options:
🔌对话处理器COMBONone22 options: None, LLaVA-1.5, LLaVA-1.6, Moondream2, nanoLLaVA, llama3-Vision-Alpha, +16
🖼️mmproj文件COMBONone1 options: None
📐上下文长度INT8192512–131072
💾显存限制(GB)FLOAT-1.0-1–999
🔢图像最小tokenINT2561–4096
🔢图像最大tokenINT13441–8192
🎨提示词风格COMBO6 options: 提示词风格 - JSON, 提示词风格 - 标签, 提示词风格 - 电影质感, 提示词风格 - 简单, 提示词风格 - 详细, 提示词风格-12维度极致强化
💬附加指令STRING在风格提示词基础上追加的额外指令(可留空)
📏图像最大边长INT112064–4096
🎲随机种子INT00–18446744073709550000
📊最大输出tokenINT10241–32768
🌡️温度FLOAT0.300–2
🎯top_pFLOAT0.900–1
🔝top_kINT400–200
🔁重复惩罚FLOAT1.100–2
🧠思考模式BOOLEANfalse
🧠Qwen3.8推理强度COMBO关闭仅 Qwen3.8 生效;关闭=不思考,自动/高=模型最高档,低/中等=降低思考强度。
⚡推理后卸载模型BOOLEANfalse
🖼️图像1optIMAGE
🖼️图像2optIMAGE
🖼️图像3optIMAGE
🖼️图像4optIMAGE
🖼️图像5optIMAGE
🖼️图像6optIMAGE
🖼️图像7optIMAGE
🖼️图像8optIMAGE
🍭反推额外选项optLLAMA_CAPTION_OPTIONS

Outputs (3)

NameTypeDescription
💬反推文本STRING
📋完整对话历史STRING
🔢使用的种子INT