💬大炮本地多轮对话@炮老师的小课堂
Skills, @materials, and a session that survives the graph
- 🤖本地模型
- ⚙️对话设置
- 🧩Skill配置
- 📦素材库
- 💬助手回复
- 📚会话历史JSON
- 🧩Skill最终结果
DapaoMultiTurnChatV2 is the terminal node of this pack's chat workbench - the "💬大炮本地多轮对话" that ties everything else together. If Dapao_LlamaChat is the quick single-shot chat, this is the full agentic setup: Skill orchestration, @material injection, session history that persists as JSON, and three string outputs that feed the rest of your graph. The recommended wiring from the pack is loader → chat, Skill loader → chat, settings → chat, material library → chat. Everything feeds this one node, and it's the only one marked as an output node.
How it works
The visible inputs are deliberately machine-ish because the workbench UI (the node's web extension) manages them: 💬本轮消息, 📚会话历史, 🖼️图片引用, 🧩流程状态, 🧩选项, 🆔请求标识, and 🧭执行动作. Don't let the defaults like [] and {} scare you - those are JSON blobs the UI fills in. The action field is where the real commands live: a normal "send" runs chat plus its upstream; "清除上下文" (clear context) keeps the visible history but stops feeding old turns to the model; "发送最终状态" (publish final) calls no model at all and just pushes the Skill result - or the last assistant reply - to real downstream nodes.
Three optional inputs carry the workbench: 🤖本地模型 (from DapaoLocalModelLoader), ⚙️对话设置 (from DapaoChatSettings), 🧩Skill配置 (from DapaoSkillLoader), and 📦素材库 (from DapaoLocalChatMaterialLibrary).
The outputs that matter
💬助手回复- the actual reply, plain STRING. Wire it to a text preview, a save node, or into your pipeline.📚会话历史JSON- the session, serialized. This is your persistence layer: store it, reload it next queue, and the conversation continues.🧩Skill最终结果- the Skill's final output, separate from casual chat, so a Skill pipeline can hand structured results downstream without parsing the chat text.
The @material rule (the one thing to remember)
Same rule as the library node, because this is where it bites: only materials you @ this turn enter inference. @图片1, @视频1, @音频1 in the message box. History keeps the numbers and text analysis, not the media - so long chats stay light on context, and re-showing an image means re-@ing it. The node will even auto-send a "please analyze the uploaded image" message if you attach image refs without text.
Where people get burned
The UI is the workflow - if you're driving this node by hand-editing the JSON inputs instead of using the built-in chat window, you're fighting it. Let the web extension manage history and state. Also: image/video turns require a matched mmproj on the loaded model, or you get a clear error telling you to load the vision projection. And remember 发送最终状态 is the cheap way to push results to downstream nodes without burning another inference - it's free.
Installing it
One pack install for the whole workbench:
cd ComfyUI/custom_nodes
git clone https://github.com/paolaoshi/ComfyUI-llama_Dapao
then pip install -r requirements.txt and restart. The recurring pack gotcha: llama-cpp-python is pinned to the JamePeng fork at 0.3.47+ - stock PyPI 0.3.35 can't load Qwen3.8 GGUFs (missing tensor 'blk.64.ssm_conv1d.weight'). NVIDIA users overlay a matching GPU wheel from the JamePeng releases and restart. GGUF + mmproj live in ComfyUI/models/LLM/. It's a heavier setup than Dapao_LlamaChat, but it's the one that earns its keep when you actually want a persistent, skill-driven chat inside the graph.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| 💬本轮消息 | STRING | — | |
| 📚会话历史 | STRING | [] | — |
| 🖼️图片引用 | STRING | [] | — |
| 🧩流程状态 | STRING | {} | — |
| 🧩选项 | STRING | [] | — |
| 🆔请求标识 | STRING | — | |
| 🧭执行动作 | STRING | chat | — |
| 🤖本地模型opt | DAPAO_LOCAL_MODEL | — | |
| ⚙️对话设置opt | DAPAO_CHAT_SETTINGS | — | |
| 🧩Skill配置opt | DAPAO_SKILL_CONFIG | — | |
| 📦素材库opt | DAPAO_LOCAL_CHAT_MATERIAL_LIBRARY | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| 💬助手回复 | STRING | — |
| 📚会话历史JSON | STRING | — |
| 🧩Skill最终结果 | STRING | — |