Prompt Chain
The node that replaces your prompt box entirely
- inputs
- out
- positive
- negative
- regions
Most "prompt" nodes are a text box with a wire coming out. Prompt Chain is not that - it's an entire prompt-authoring app that happens to live inside a ComfyUI node. Syntax-highlighted code editor, inline wildcards, autocomplete, a right-click Tag Builder, drag-and-drop prompt recovery from generated images - and underneath all of it, four wires (out/positive/negative/regions) that every other node in the mobcat40/ComfyUI-PromptChain suite expects to see. If you're using any other node from this pack - the 3D Poser, the regional couplers, the detailers - this is the node they all sit downstream of.
How it works
Type your prompt in the editor and Prompt Chain compiles it into positive and negative strings the rest of your graph can use. The interesting part is what "compile" means here. Inline wildcards (::Label::a|b|c) and __file__ wildcards resolve per queue; @ pulls in a whole curated character/style/pose bundle at once, cascading its outfit and pose along with it; $name{...} marks a block as belonging to a specific figure, which is what turns a flat prompt into a multi-character one once you wire in region data from the pack's other nodes. Chain several Prompt Chain nodes together and a mode decides how their outputs merge: Combine all of them, Randomize one at random, Switch to a picked branch, or Iterate through options across queued runs.
The inputs and outputs that matter
The field you actually type into is prompt (multiline). mode is the chain-merge behavior above (defaults to switch); if you're on switch, switch_index picks which linked branch fires. Everything else in the required list - locked, disabled, collapsed, cached_output, cached_neg_output, iterate_index, iterate_cycle, wildcard_modes, cached_regions - is state the editor UI writes back into the node so a re-run or workflow reload restores exactly what you last had open. Don't hand-edit those; let the panel own them. The optional inputs slot is an auto-growing group that expands as you chain more Prompt Chain nodes into this one.
Four outputs, and they go different places:
out- the full raw compiled text, including any$name{}markup.positive/negative- the split prompt halves; wire these to a CLIPTextEncode, or straight into any of the pack's regional nodes if you're not encoding separately.regions- a STRING every regional node in the pack (Attention Couple, Z-Image Regional Couple, Regional Conditioning, Regional Detailer, Ideogram Caption) wants on itsregionsinput. It's what carries your$name{...}blocks out as addressable per-character data.
The node is also flagged is_output_node, so ComfyUI won't prune it from the graph even with a dangling wire - worth knowing if you're debugging why a node you thought was dead code still runs every queue.
How to install it
Search ComfyUI-PromptChain in ComfyUI Manager and install, or clone it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/mobcat40/ComfyUI-PromptChain.git
Restart ComfyUI, drop a Prompt Chain node onto the canvas, and the pack's own first-run walkthrough takes over from there - it validates recommended ComfyUI settings, offers to check a CivitAI key for model recognition, and can self-install the heavier optional features (Style Reference, Upscaler, Face Detailer, ControlNet, PuLID, SeedVR2, AI Selection) on first use, each with its own progress bar and no separate Manager round-trip. There's a health dashboard for all of that under Settings → PromptChain → Install if something needs a nudge.
Common issues & troubleshooting
It's beta and the maintainer says so. The README opens with a flat warning that things may change and break - this is an early public release, not a mature, years-old node. Expect UI changes between updates.
Nothing downstream reacts to your prompt. Check you're reading positive/negative, not out - out is the raw uncompiled string including any $name{} markup, which isn't what a plain CLIPTextEncode wants.
Regional blocks aren't binding to the right character. $name{} blocks bind by name, and the name has to match whatever the mask/pose source (3D Poser or Region Box) calls that figure. Rename a figure in the poser after writing your prompt, and the block and the mask silently stop matching until you fix it on both sides.
One license note worth knowing: the pack is AGPL-3.0 - if you're running a modified version of it behind a hosted service, that license requires offering your users the modified source.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| mode | STRING | switch | — |
| switch_index | INT | 1 | — |
| locked | BOOLEAN | false | — |
| disabled | BOOLEAN | false | — |
| cached_output | STRING | — | |
| cached_neg_output | STRING | — | |
| iterate_index | INT | 0 | — |
| iterate_cycle | INT | 1 | — |
| collapsed | BOOLEAN | false | — |
| wildcard_modes | STRING | — | |
| cached_regions | STRING | — | |
| inputsopt | COMFY_AUTOGROW_V3 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| out | STRING | — |
| positive | STRING | — |
| negative | STRING | — |
| regions | STRING | — |