Nodes/Mickmumpitz-Nodes/Prompt Stitcher
ComfyUI Node

Prompt Stitcher

One style string, a whole batch of prompts, zero copy-paste

By mickmumpitz·Created 8 months ago·Updated 9 days ago· 47
Prompt Stitcher
  • string_batch
  • prompt_1
  • prompt_2
  • prompt_3
  • prompt_4
  • prompt_5
  • prompt_6
  • prompt_7
  • prompt_8
  • prompt_9
  • prompt_10
  • prompt_11
  • prompt_12
  • prompt_13
  • prompt_14
  • prompt_15
  • prompt_16
  • prompt_17
  • prompt_18
  • prompt_19
  • prompt_20
  • prompt_21
  • prompt_22
  • prompt_23
  • prompt_24
style
separator,
num_outputs4

You're running a multi-shot or story workflow. You've got a batch of prompts - one per shot, say - and a style string you want on every single one, like cinematic, moody lighting, 35mm. The boring way is pasting that suffix into twenty text nodes and praying you keep them in sync. The Mickmumpitz way is dropping a Prompt Stitcher between your prompt batch and your samplers and editing the style once.

Prompt Stitcher lives in the "String Batch" section of Mickmumpitz-Nodes, the pack by the YouTuber behind those elaborate consistent-character and long-form video workflows. It's the glue that turns a STRING_BATCH (a tuple of prompts) into individual prompt_N outputs with a shared style tacked onto each.

How it works

Nothing magical - that's the point. It takes your string_batch, then for each prompt up to num_outputs it appends separator + style and hands the result out on its own output. The mechanism is dead simple: prompt + ", " + style per entry. If style is empty, prompts pass through untouched, so the node doubles as a batch unpacker when you don't need styling at all.

The node always exposes 24 outputs, but only the first num_outputs get populated - the rest come out as empty strings, and the pack's JS extension hides the unused sockets so the graph stays tidy.

The inputs that matter

  • string_batch - the batch of prompts. It has to be a real STRING_BATCH (from the pack's String Batch node or Story Style Selector), not a plain string.
  • style - the suffix added to every prompt. Multiline, and marked forceInput, so you can wire it from a text node or a selector if you want it dynamic.
  • separator - default ", ". If your prompts already end with a comma you might want "" here to avoid double commas.
  • num_outputs - default 4, up to 24. Set this to how many prompts you actually feed.

What you do with the outputs

Wire prompt_1 through prompt_N into your per-shot CLIP text encode nodes (or a prompt router). If you're using the pack's shot system, each SHOT N group can grab its own stitched prompt - this is how the author keeps one style string controlling an entire multi-shot generation instead of juggling duplicates.

Install

It ships inside Mickmumpitz-Nodes, so:

cd ComfyUI/custom_nodes
git clone https://github.com/mickmumpitz/ComfyUI-Mickmumpitz-Nodes

then restart ComfyUI - or skip the terminal and search "Mickmumpitz" in ComfyUI Manager and hit Install. The pack's dependencies are lightweight (numpy, Pillow, opencv-python); no models to download for this node.

Where people get burned

The most common stumble is feeding a plain string in where a STRING_BATCH belongs - you'll get a type error at the socket. Batch it first with the pack's String Batch node. Second: if num_outputs is bigger than the batch size, the extras come out as empty strings, and an empty prompt feeding a sampler is its own kind of confusing. Keep the two in sync and this node quietly disappears into your workflow, which is exactly what it's for.

CategoryMickmumpitz/String Batch

Inputs (4)

NameTypeDefaultDescription
string_batchSTRING_BATCH
styleSTRING
separatorSTRING,
num_outputsINT41–24

Outputs (24)

NameTypeDescription
prompt_1STRING
prompt_2STRING
prompt_3STRING
prompt_4STRING
prompt_5STRING
prompt_6STRING
prompt_7STRING
prompt_8STRING
prompt_9STRING
prompt_10STRING
prompt_11STRING
prompt_12STRING
prompt_13STRING
prompt_14STRING
prompt_15STRING
prompt_16STRING
prompt_17STRING
prompt_18STRING
prompt_19STRING
prompt_20STRING
prompt_21STRING
prompt_22STRING
prompt_23STRING
prompt_24STRING