Nodes/ComfyUi-MpiNodes/Mpi Prompt Processor
ComfyUI Node

Mpi Prompt Processor

Where _title_ tokens finally become real prompt text

By MadPonyInteractive·Created 11 months ago·Updated 5 days ago· 3
Mpi Prompt Processor
  • prompt_list
  • prompt
  • positive
  • negative
  • seed
  • boolean
positive
negative
cleanuptrue
seed0
probability1.00
opt_title

Every other node in the ComfyUi-MpiNodes prompt system is about generating selections. Mpi Prompt Processor is the one that turns them into actual text. You wire in a PROMPT_LST (from one or more chained MpiPromptList nodes), write a positive and negative template that references lists by their _title_ tokens, and out come two plain strings you feed to CLIP Text Encode. It's the endpoint of the whole pipeline.

How it works

The template is just text with _title_ placeholders - like "a _hair_ woman in _clothes_, _expression_". The Processor walks every list in the chain, and for each one whose title appears in the template, replaces the token with that list's selected option. It handles the pack's extended syntax too: _title_x2_ inserts the selection twice, and _pickers_3_-style tokens pick multiple options.

The order matters: lists can block each other (via the blocks field on MpiPromptList), and the processor respects that - a blocked list contributes nothing. And the cleanup toggle (on by default) strips any _title_ that couldn't be replaced, so a dead token doesn't leak literal underscore garbage into your prompt. Turn cleanup off if you want to see what's failing.

The inputs that matter

  • prompt_list - the PROMPT_LST from your chain of MpiPromptList nodes.
  • positive / negative - the two templates, with _title_ tokens.
  • seed - drives the probability roll on the whole output.
  • probability - a gate on the entire prompt: 0.0 always bypasses, 1.0 always outputs, 0.5 is a coin flip.
  • opt_title - a unique ID that turns this processor's output into a reusable prompt that other lists can call by title.

Outputs: prompt (the processed PROMPT_LST, chainable onward), positive and negative (the resolved strings - wire these to CLIP Text Encode), seed, and boolean (did it pass the probability gate).

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/MadPonyInteractive/ComfyUi-MpiNodes

Restart, or ComfyUI Manager → search ComfyUi-MpiNodes. Pure Python, no deps. AGPL-3.0 at current versions (MIT through 1.2.6).

Troubleshooting

The most common failure is a token left un-replaced - usually a typo between the list title and the _title_ in the template, or a list that got blocked. The processor lowercases tokens, so _HAIR_ and _hair_ match the same list; if it's still missing, check the blocks fields. Second gotcha: this is where suffix on a list lands after your negative text, so a suffix you wrote as a positive qualifier can end up polluting the negative. If your negatives look weird, audit the suffixes first.

CategoryMpiNodes/PromptGen

Inputs (7)

NameTypeDefaultDescription
prompt_listPROMPT_LST
positiveSTRINGPositive prompt
negativeSTRINGNegative prompt
cleanupBOOLEANtrueWhen enabled, it will remove any _title_ that couldn't be replaced
seedINT00–18446744073709550000
probabilityFLOAT1.000–10.0 will always bypass this prompt output and return False 1.0 will always let this prompt through and return True 0.5 gives both a 50% chance
opt_titleoptSTRINGUnique ID, use to convert to a reusable prompt

Outputs (5)

NameTypeDescription
promptPROMPT_LST
positiveSTRING
negativeSTRING
seedINT
booleanBOOLEAN