😶🌫️llama智能对话@炮老师的小课堂
The multimodal chat node that never leaves your GPU
- 🖼️图像1
- 🖼️图像2
- 🖼️图像3
- 🖼️图像4
- 🖼️图像5
- 🖼️图像6
- 🖼️图像7
- 🖼️图像8
- 🎬视频1
- 🎬视频2
- 🔊音频1
- 🔊音频2
- 🔗队列处理器
- 💬回复文本
- 📋完整对话历史
- 🔢使用的种子
This is the flagship node of the pack, and it's the reason to install it. Dapao_LlamaChat is a full local multimodal chat inside ComfyUI: model loading, sampling, and conversation all in one box, fed by your own GGUF files. No API key, no cloud round-trip, no Ollama server in the loop - just llama.cpp running a model on your card. In 2026 that's the exact pattern people keep asking for in r/comfyui: any GGUF LLM as a native node instead of a separate process (the KB's LLM-in-ComfyUI essay calls it the standing community want).
It takes text, and if you give it a vision model with a matching mmproj, it takes 8 images + 2 videos + 2 audio tracks simultaneously. That's a lot of context plumbing for a single node, and it's genuinely the selling point.
How it works
Under the hood it's llama-cpp-python talking to a GGUF file from ComfyUI/models/LLM/, with a chat-handler dropdown that tells it what kind of model you loaded: LLaVA-1.5/1.6, Moondream2, MiniCPM, Gemma3/4, Qwen2.5-VL / Qwen3-VL / Qwen3.5 / Qwen3.8, GLM-4.6V, LFM2-VL, Granite-Docling, or None for pure text. Images get scaled to the 📏图像最大边长 cap and packed as tokens, with 🔢图像最小token / 🔢图像最大token (256/1344 by default) controlling the per-image token budget. Video comes in as IMAGE frame batches - no extra video-decode dependency - and 🎞️最大帧数 (default 10) decides how many frames get sampled.
The 💾显存限制(GB) tooltip is the best documentation in the whole pack: it's the VRAM budget the LLM may use, not a reservation. -1 means "try to put everything on GPU" (fastest, but can OOM); a number means partial offload, with a rough table - 8GB card → 6, 12GB → 10, 16GB → 13, 24GB → 20 - leaving ~2GB for ComfyUI, the mmproj, and the context cache. That's the knob to reach for when you share the card with a diffusion model.
🧠思考模式 enables chain-of-thought output for Thinking-series models, and the 🧠Qwen3.8推理强度 dropdown (关闭/自动/低/中等/高) is the Qwen3.8-specific reasoning control - auto and high both mean the model's native xhigh.
Inputs and outputs that matter
📝系统提示词and💬用户提示词- the conversation itself.💾保存对话历史- off by default; flip it on for multi-turn and the📋完整对话历史output carries the JSON.⚡推理后卸载模型- offload the GGUF and mmproj after each run to free VRAM for diffusion; on means the next turn reloads, which is slower but leaves the card empty for sampling.- Outputs:
💬回复文本(STRING - wire it into a text node, a preview, or a CLIP encode),📋完整对话历史(STRING), and🔢使用的种子(INT).
The 🔗队列处理器 input is an any-type pipe, handy for chaining this node in a bigger graph.
Where people get burned
If the model dropdown is empty, you haven't put a .gguf in ComfyUI/models/LLM/ (and the mmproj file must contain "mmproj" in its name or it won't show as a vision option). Images fail to load when you picked a text-only handler or no mmproj. And the install itself is the real trap - see below, because this pack's dependency story is the most common support ticket.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/paolaoshi/ComfyUI-llama_Dapao
or search the pack title in ComfyUI Manager. Then the gotcha: the pack pins llama-cpp-python from the JamePeng fork at a tested commit (0.3.47+) because PyPI's stock 0.3.35 can't load Qwen3.8 GGUFs with MTP/NextN layers - you'll see missing tensor 'blk.64.ssm_conv1d.weight' if it's too old. CPU users build from source via pip install -r requirements.txt; NVIDIA users install a matching GPU wheel from the JamePeng releases page with --force-reinstall to override the CPU build, then restart. Don't pick the wheel by the driver's advertised CUDA version alone - the wheel's bundled CUDA runtime has to actually match your environment.
If you mainly want captions, Dapao_LlamaCaption is this node specialized; if you want the full Skill-based chat workbench, that's the DapaoLocalModelLoader + DapaoMultiTurnChatV2 family.
Inputs (34)
| 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 | 这是LLM可使用的显存预算,不是预留空间。-1=尝试全部放入GPU,最快但可能因显存不足失败;填写数值=只将部分模型层放入GPU,其余使用系统内存。参考起点:8GB显卡填6,12GB填10,16GB填13,24GB填20,32GB填24-28。请为ComfyUI、mmproj和上下文缓存保留约2GB。 |
| 🔢图像最小token | INT | 2561–4096 | — |
| 🔢图像最大token | INT | 13441–8192 | — |
| 📝系统提示词 | STRING | You are a helpful assistant. | — |
| 💬用户提示词 | STRING | 请描述这张图片。 | — |
| 🎞️最大帧数 | INT | 101–200 | — |
| 📏图像最大边长 | INT | 112064–4096 | — |
| 🎲随机种子 | INT | 00–18446744073709550000 | — |
| 📊最大输出token | INT | 10241–32768 | — |
| 🌡️温度 | FLOAT | 0.700–2 | — |
| 🎯top_p | FLOAT | 0.900–1 | — |
| 🔝top_k | INT | 400–200 | — |
| 🔁重复惩罚 | FLOAT | 1.100–2 | — |
| 🧠思考模式 | BOOLEAN | false | 开启后模型会输出思考过程(仅 Thinking 系列模型有效) |
| 🧠Qwen3.8推理强度 | COMBO | 关闭 | 仅 Qwen3.8 生效;关闭=不思考,自动/高=模型最高档,低/中等=降低思考强度。 |
| 💾保存对话历史 | BOOLEAN | false | — |
| ⚡推理后卸载模型 | BOOLEAN | false | — |
| 🖼️图像1opt | IMAGE | — | |
| 🖼️图像2opt | IMAGE | — | |
| 🖼️图像3opt | IMAGE | — | |
| 🖼️图像4opt | IMAGE | — | |
| 🖼️图像5opt | IMAGE | — | |
| 🖼️图像6opt | IMAGE | — | |
| 🖼️图像7opt | IMAGE | — | |
| 🖼️图像8opt | IMAGE | — | |
| 🎬视频1opt | IMAGE | — | |
| 🎬视频2opt | IMAGE | — | |
| 🔊音频1opt | AUDIO | — | |
| 🔊音频2opt | AUDIO | — | |
| 🔗队列处理器opt | * | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| 💬回复文本 | STRING | — |
| 📋完整对话历史 | STRING | — |
| 🔢使用的种子 | INT | — |