Nodes/ComfyUI-llama_Dapao/📦大炮本地多轮对话素材库@炮老师的小课堂
ComfyUI Node

📦大炮本地多轮对话素材库@炮老师的小课堂

Register 20 images, inject only what you @

By paolaoshi·Created 4 months ago·Updated 2 days ago· 44
📦大炮本地多轮对话素材库@炮老师的小课堂
  • 🖼️图片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
  • 📦多轮对话素材库
🏷️素材别名{}

DapaoLocalChatMaterialLibrary ("大炮本地多轮对话素材库") is the staging area for the chat workbench. It registers up to 20 images, 5 videos, and 5 audio clips as numbered materials, and hands the whole bundle to DapaoMultiTurnChatV2 as a DAPAO_LOCAL_CHAT_MATERIAL_LIBRARY object. That's the whole job - and the job has one rule you must internalize, because it's the difference between this node being useful and this node being a memory hog.

Connecting media to the library does not put it in context. The README is explicit: the library is just the prep area. Only the materials you explicitly reference in this turn's chat message with an @ - @图片1, @视频2, @音频1 - get processed and sent to the model. And history stores only material numbers plus text analysis, never the raw media again; to have the model re-look at something, you re-@ it.

That design exists for a reason. If all 20 images auto-loaded into context every turn, you'd blow your context window in one message. Selective injection is what keeps the workbench usable on a consumer card - the same VRAM-budgeting logic that runs through the whole pack.

What each input does

  • 🏷️素材别名 - an optional JSON dictionary mapping names to friendlier labels, e.g. {"图片1":"产品正面","视频1":"开场镜头"}. The fixed numbers are the internal stable IDs; aliases are just for you and the model.
  • 🖼️图片1🖼️图片20 - each accepts a single IMAGE, per the tooltips. One wire per image; no batching in one port.
  • 🎞️视频1🎞️视频5 - VIDEO inputs. Frames are only extracted when that video is @-referenced this turn.
  • 🎵音频1🎵音频5 - AUDIO inputs. Only compressed to 16kHz mono WAV when referenced.

Mechanically, the chat node does the heavy lifting downstream: images are Lanczos-scaled to a max edge (the 2K default from chat settings) and sent as PNG, videos get representative frames, audio becomes the 16kHz mono WAV. Whether audio actually reaches the model depends on whether your GGUF + llama.cpp ChatHandler supports input_audio - if not, the node tells you clearly instead of failing silently.

Where people get burned

Two traps. First, the "it's connected but the model can't see my image" panic - that's the @ rule. Second, image/video chat requires a matched mmproj on the model loader; without it, an @图片1 turn errors out with a message telling you to load the vision projection. If you're doing pure text chat, none of this matters - leave the library unwired and skip the node entirely.

Installing it

Standard pack install, once:

cd ComfyUI/custom_nodes
git clone https://github.com/paolaoshi/ComfyUI-llama_Dapao

then requirements + restart. Pack-wide gotchas apply: llama-cpp-python from the JamePeng fork (0.3.47+ for Qwen3.8; stock PyPI 0.3.35 errors on its GGUFs), GPU wheel overlay for NVIDIA, models in ComfyUI/models/LLM/. The library itself holds no model, but it's dead weight without DapaoLocalModelLoader and DapaoMultiTurnChatV2 on the canvas beside it.

Category🍭大炮-llama-cpp

Inputs (31)

NameTypeDefaultDescription
🏷️素材别名STRING{}可选。JSON示例:{"图片1":"产品正面","视频1":"开场镜头"}。固定编号始终是内部稳定ID。
🖼️图片1optIMAGE待引用图片1;每个接口只连接单张IMAGE。
🖼️图片2optIMAGE待引用图片2;每个接口只连接单张IMAGE。
🖼️图片3optIMAGE待引用图片3;每个接口只连接单张IMAGE。
🖼️图片4optIMAGE待引用图片4;每个接口只连接单张IMAGE。
🖼️图片5optIMAGE待引用图片5;每个接口只连接单张IMAGE。
🖼️图片6optIMAGE待引用图片6;每个接口只连接单张IMAGE。
🖼️图片7optIMAGE待引用图片7;每个接口只连接单张IMAGE。
🖼️图片8optIMAGE待引用图片8;每个接口只连接单张IMAGE。
🖼️图片9optIMAGE待引用图片9;每个接口只连接单张IMAGE。
🖼️图片10optIMAGE待引用图片10;每个接口只连接单张IMAGE。
🖼️图片11optIMAGE待引用图片11;每个接口只连接单张IMAGE。
🖼️图片12optIMAGE待引用图片12;每个接口只连接单张IMAGE。
🖼️图片13optIMAGE待引用图片13;每个接口只连接单张IMAGE。
🖼️图片14optIMAGE待引用图片14;每个接口只连接单张IMAGE。
🖼️图片15optIMAGE待引用图片15;每个接口只连接单张IMAGE。
🖼️图片16optIMAGE待引用图片16;每个接口只连接单张IMAGE。
🖼️图片17optIMAGE待引用图片17;每个接口只连接单张IMAGE。
🖼️图片18optIMAGE待引用图片18;每个接口只连接单张IMAGE。
🖼️图片19optIMAGE待引用图片19;每个接口只连接单张IMAGE。
🖼️图片20optIMAGE待引用图片20;每个接口只连接单张IMAGE。
🎞️视频1optVIDEO只有本轮@视频1时才抽取代表帧。
🎵音频1optAUDIO只有本轮@音频1时才压缩为16kHz单声道WAV。
🎞️视频2optVIDEO只有本轮@视频2时才抽取代表帧。
🎵音频2optAUDIO只有本轮@音频2时才压缩为16kHz单声道WAV。
🎞️视频3optVIDEO只有本轮@视频3时才抽取代表帧。
🎵音频3optAUDIO只有本轮@音频3时才压缩为16kHz单声道WAV。
🎞️视频4optVIDEO只有本轮@视频4时才抽取代表帧。
🎵音频4optAUDIO只有本轮@音频4时才压缩为16kHz单声道WAV。
🎞️视频5optVIDEO只有本轮@视频5时才抽取代表帧。
🎵音频5optAUDIO只有本轮@音频5时才压缩为16kHz单声道WAV。

Outputs (1)

NameTypeDescription
📦多轮对话素材库DAPAO_LOCAL_CHAT_MATERIAL_LIBRARY