Context Collector
One block of reference material for your LLM, framed properly
- context
If you're using a local LLM in your workflow to expand prompts, you've already hit the real problem: an LLM is only as useful as what you put in front of it, and stuffing raw text into the system prompt doesn't tell the model what it's looking at. Context Collector is the node that frames your reference material - the character cards, entity cards, world notes - into one tidy block the model can latch onto.
Mechanically it's simple: a list of item_N text inputs that grows on demand (connect the last slot and a new one appears), all joined in index order and wrapped under a title. Empty or unconnected slots are skipped, so a card you haven't filled doesn't leave a blank hole in the block.
The inputs that matter:
item_1(required, and it keeps growing) - the cards/text chunks. Wire your Character Cards and Entity Cards here.title- the heading, e.g.CharactersorReference. Empty = no heading.wrapper-markdown headingornone(title in bold, no heading markup).heading_level-#through######; sets where the block sits in the context hierarchy. Default##.separator- what goes between items. Default is a blank line.
The output:
context- the framed block. Wire it into aLocal LLM Settings (GGUF)node'scontextinput, where it gets appended to the system prompt.
Here's why the framing matters. With cards under a heading, a prompt like "Vasya and Kolya drink tea in a cafe" comes back from the LLM expanded with each character's looks, because the model can bind the name to the description that follows. Without the heading, it's just prose. Choose the heading level based on how much other structure is in your system prompt - you're carving out one section of the context, not shouting over it.
One honest caveat the pack's own docs repeat: the diffusion model downstream still has its own limits when you bind attributes across multiple people in one image. Context Collector feeds the prompt-writing LLM, and a good expanded prompt is the best you can do - it won't magically fix a model that can't hold two characters' attributes straight.
Install via ComfyUI Manager (search "Kinburg-Nodes") or:
cd ComfyUI/custom_nodes
git clone https://github.com/Kinburg/Kinburg-Nodes
then restart. This node has no dependencies beyond the pack itself - it's just string assembly. The llama-cpp-python dependency the pack installs automatically is only needed if you actually run the Local LLM nodes, and nothing here requires a model download. A one-author pack, but a well-maintained one: per-package docs, 1395 automated checks, and the input/output names are audited so docs can't drift from the real schema.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| item_1 | STRING | — | |
| title | STRING | Characters | Heading placed at the top of the block (e.g. 'Characters', 'Reference'). Empty = no heading. |
| wrapper | COMBO | markdown heading | How to frame the block: a Markdown heading (pick its level below) or none (title in bold, no heading markup). |
| heading_level | COMBO | ## | Markdown heading level for the title (wrapper = markdown heading). '#' = H1 (top of the hierarchy), '##' = H2, … Ignored when wrapper = none. |
| separator | STRING | Inserted between the collected items. Default is a blank line. | |
| item_2opt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| context | STRING | — |