📦大炮API多轮对话素材库@炮老师的小课堂
The @-mention image library for dapaoAI chat, and why it only sends what you tag
- 🖼️图片1
- 🖼️图片2
- 🖼️图片3
- 🖼️图片4
- 🖼️图片5
- 🖼️图片6
- 🖼️图片7
- 🖼️图片8
- 🖼️图片9
- 🖼️图片10
- 🖼️图片11
- 🖼️图片12
- 🖼️图片13
- 🖼️图片14
- 🖼️图片15
- 🖼️图片16
- 🖼️图片17
- 🖼️图片18
- 🖼️图片19
- 🖼️图片20
- 🎞️视频1
- 🎵音频1
- 🎞️视频2
- 🎵音频2
- 🎞️视频3
- 🎵音频3
- 🎞️视频4
- 🎵音频4
- 🎞️视频5
- 🎵音频5
- 📦多轮对话素材库
Ever seen those chat boxes where the model is supposed to look at your reference images but there's no clean way to say which one, this round? DapaoAPIChatMaterialLibraryNode is the dapaoAI workbench's answer: a sideboard where you park up to 20 images, 5 videos, and 5 audio files, then reference them from the chat itself with @图片1, @视频1, @音频1 style mentions. Only the materials you tag in the current message get processed and sent. Untagged materials never leave your machine - which is both a privacy win and a token-cost win, because nothing is uploaded that the model isn't asked about.
How it works
You wire up to 20 🖼️图片N inputs (each expecting a single IMAGE), 5 🎞️视频N, and 5 🎵音频N - the tooltip for each video and audio slot spells out the deal: video is only keyframe-extracted and sent when the current chat round mentions @视频N, audio only gets compressed and sent on @音频N. The node hands the chat node a single 📦多轮对话素材库 output of custom type DAPAO_API_CHAT_MATERIAL_LIBRARY.
Then the chat node's message parser scans your message for @图片N / @视频N / @音频N references, matches them to the library, and builds the actual request parts. Two rules the README hammers home:
- Materials only travel in the round that tags them. If you want the model to re-examine something next round, you
@it again. This is deliberate - it keeps every call cheap and keeps history from silently carrying megabytes of image data. - Images get Lanczos-scaled to a max 2048px long edge and sent as PNG, per-image, right at the request boundary (that cap is actually governed by the settings node). Videos get representative frames pulled by model capability; audio only goes to models that explicitly accept audio input.
There's also one optional input, 🏷️素材别名 - a JSON map like {"图片1":"产品正面","视频1":"开场镜头"} that gives your materials friendlier names. The tooltip notes fixed numbers are still the stable internal IDs, so aliases are just labels for the LLM's benefit, not renumbering.
Why you'd use it
The whole workbench is aimed at people building chat-driven generation pipelines - a model that looks at a product shot and emits an image prompt, or a video prompt, or answers questions about your assets. This node is what makes those workflows cheap to iterate on. Compare it to the blunt alternative (dump every reference into every call): the @-mention model means a 20-image library costs you nothing until you actually ask about an image. That's the difference between a toy and a pipeline that won't empty your wallet by accident.
Where it slots in
It's optional in the stack - DapaoAPIMultiTurnChatNode has a 📦素材库 input that accepts its output. When a material is selected but the mapped model can't take images, the chat node throws a clear "switch to a multimodal model" error rather than silently dropping it - one of the more thoughtful touches in this pack.
Gotchas
- One IMAGE per port, tooltip says so explicitly. Batches will confuse it - split them.
- The
@图片Nmention must match the port number.@图片1is port 🖼️图片1. Aliases don't change which number triggers what. - If the model doesn't support audio input, tagging audio either gets skipped or errors depending on model - stick to image/video refs unless you know your model takes audio.
- Re-tagging every round is easy to forget, and the model will cheerfully answer without re-looking at the reference. That's the feature, but it does mean your prompt discipline matters.
Install: ComfyUI Manager → "dapaoAPI", or git clone https://github.com/paolaoshi/ComfyUI-dapaoAPI.git into ComfyUI/custom_nodes/, pip install -r requirements.txt, restart. You need a dapaoAI API key (register at api.dapaoai.com, top up via redeem code) in the config node upstream. Like the rest of the pack the menus are Simplified Chinese - the numbers in the port names make it survivable.
Inputs (31)
| Name | Type | Default | Description |
|---|---|---|---|
| 🏷️素材别名 | STRING | {} | 可选。JSON示例:{"图片1":"产品正面","视频1":"开场镜头"}。固定编号仍是内部稳定ID。 |
| 🖼️图片1opt | IMAGE | 待引用图片1;每个接口请连接单张IMAGE。 | |
| 🖼️图片2opt | IMAGE | 待引用图片2;每个接口请连接单张IMAGE。 | |
| 🖼️图片3opt | IMAGE | 待引用图片3;每个接口请连接单张IMAGE。 | |
| 🖼️图片4opt | IMAGE | 待引用图片4;每个接口请连接单张IMAGE。 | |
| 🖼️图片5opt | IMAGE | 待引用图片5;每个接口请连接单张IMAGE。 | |
| 🖼️图片6opt | IMAGE | 待引用图片6;每个接口请连接单张IMAGE。 | |
| 🖼️图片7opt | IMAGE | 待引用图片7;每个接口请连接单张IMAGE。 | |
| 🖼️图片8opt | IMAGE | 待引用图片8;每个接口请连接单张IMAGE。 | |
| 🖼️图片9opt | IMAGE | 待引用图片9;每个接口请连接单张IMAGE。 | |
| 🖼️图片10opt | IMAGE | 待引用图片10;每个接口请连接单张IMAGE。 | |
| 🖼️图片11opt | IMAGE | 待引用图片11;每个接口请连接单张IMAGE。 | |
| 🖼️图片12opt | IMAGE | 待引用图片12;每个接口请连接单张IMAGE。 | |
| 🖼️图片13opt | IMAGE | 待引用图片13;每个接口请连接单张IMAGE。 | |
| 🖼️图片14opt | IMAGE | 待引用图片14;每个接口请连接单张IMAGE。 | |
| 🖼️图片15opt | IMAGE | 待引用图片15;每个接口请连接单张IMAGE。 | |
| 🖼️图片16opt | IMAGE | 待引用图片16;每个接口请连接单张IMAGE。 | |
| 🖼️图片17opt | IMAGE | 待引用图片17;每个接口请连接单张IMAGE。 | |
| 🖼️图片18opt | IMAGE | 待引用图片18;每个接口请连接单张IMAGE。 | |
| 🖼️图片19opt | IMAGE | 待引用图片19;每个接口请连接单张IMAGE。 | |
| 🖼️图片20opt | IMAGE | 待引用图片20;每个接口请连接单张IMAGE。 | |
| 🎞️视频1opt | VIDEO | 待引用视频1;只有聊天本轮@视频1时才抽帧/发送。 | |
| 🎵音频1opt | AUDIO | 待引用音频1;只有聊天本轮@音频1时才压缩并发送。 | |
| 🎞️视频2opt | VIDEO | 待引用视频2;只有聊天本轮@视频2时才抽帧/发送。 | |
| 🎵音频2opt | AUDIO | 待引用音频2;只有聊天本轮@音频2时才压缩并发送。 | |
| 🎞️视频3opt | VIDEO | 待引用视频3;只有聊天本轮@视频3时才抽帧/发送。 | |
| 🎵音频3opt | AUDIO | 待引用音频3;只有聊天本轮@音频3时才压缩并发送。 | |
| 🎞️视频4opt | VIDEO | 待引用视频4;只有聊天本轮@视频4时才抽帧/发送。 | |
| 🎵音频4opt | AUDIO | 待引用音频4;只有聊天本轮@音频4时才压缩并发送。 | |
| 🎞️视频5opt | VIDEO | 待引用视频5;只有聊天本轮@视频5时才抽帧/发送。 | |
| 🎵音频5opt | AUDIO | 待引用音频5;只有聊天本轮@音频5时才压缩并发送。 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 📦多轮对话素材库 | DAPAO_API_CHAT_MATERIAL_LIBRARY | — |