Nodes/ComfyUI-NO8D-controls/NO8D-Prompt Merge
ComfyUI Node

NO8D-Prompt Merge

Glue for your prompt pieces

By no8d·Created 2 months ago·Updated 14 days ago· 271
NO8D-Prompt Merge
  • prompts
  • prompt

So you've built a prompt from pieces - a subject line, a style card, a lighting note - and now you need to actually combine them into one string the encoder can read. ComfyUI will let you hand a single text node the whole thing, but the whole point of building prompts modularly is that each piece is a separate node you can swap. NO8D-Prompt Merge is the joining node: it takes anywhere from 2 to 50 text inputs and outputs one prompt, in the order the ports appear on the node.

That order is the entire feature, so let's be clear about it. It joins non-empty inputs in visible port order - leftmost port first, reading across. Empty inputs get skipped, so you can leave a port unwired or feeding an empty string and it just drops out of the result. The join is newline-separated, which matters: you're composing prompt lines, not cramming tokens into one comma blob. Each line keeps its own integrity for the encoder.

What you set

  • prompts - the one input, and it's an autogrow port. Drag more lines out of the node and each becomes its own string input, prefixed prompt_1, prompt_2, etc. Give each upstream node (a Prompt Library selector, a text node, a fixed style prefix) its own port and the order you arranged them in is the order they'll appear.

Output is prompt, a single STRING, ready to feed a CLIP Text Encode or a model's grounded encode.

Why you'd bother

This node exists to serve modular prompting, and it does one job well. In the NO8D pack's world you'll most often see it fed from NO8D-Prompt-libraries (which can output several selected style cards at once) or from NO8D-Prompt's expanded text. Rather than pasting three generated prompts together by hand every run, you wire them here and the composition stays live - swap one source and the merged output changes with it.

It also quietly solves a formatting trap: when you hand-join prompts with commas or sloppy spacing, you end up with dangling punctuation that shows up as weird tokens. This node skips empties and joins with clean newlines, so a prompt built from parts actually reads like a prompt. That's more than you get from a plain concat.

Install

Standard NO8D pack install, nothing special:

cd ComfyUI/custom_nodes
git clone https://github.com/no8d/ComfyUI-NO8D-controls.git
python -m pip install -r requirements.txt

In Manager, search "NO8D-controls". No models, no extra deps beyond the pack's openpyxl/json-repair pair. The main thing that surprises people: this node is written against ComfyUI's newer backend node API (it has no old-style NODE_CLASS_MAPPINGS), so if you're on an older ComfyUI that predates that surface it may not show up - update ComfyUI and it appears. And if the merged output looks wrong, re-check the port order, not the text - the left-to-right arrangement is the one thing this node can't guess for you.

CategoryNO8D-control

Inputs (1)

NameTypeDefaultDescription
promptsCOMFY_AUTOGROW_V3

Outputs (1)

NameTypeDescription
promptSTRING