Nodes/ComfyUi-MpiNodes/Mpi Prompt List
ComfyUI Node

Mpi Prompt List

The wildcard engine behind ComfyUi-MpiNodes' prompt system

By MadPonyInteractive·Created 11 months ago·Updated 5 days ago· 3
Mpi Prompt List
  • opt_chained_list
  • opt_override
  • prompt_list
  • seed
  • boolean
  • selected_options
title
prefix
options
suffix
blocks
amount0
specific_item-1
randomtrue
seed0
probability1.00

This is the node the whole ComfyUi-MpiNodes prompt system is built around. Mpi Prompt List is the wildcard equivalent - it holds a set of options (one per line) and, when a _title_ token in a MpiPromptProcessor template asks for it, it hands over a selection. Add probability, blocking rules, chaining, and seed control and you've got a prompt-randomization engine that actually scales.

If you've ever used A1111-style wildcard prompts - __clothes__ style tokens that pick a random line from a text file - this is that idea, but as typed, composable nodes. The dynamic-prompt pattern is still very much alive in the community; this pack just industrializes it with probability gates and chaining instead of raw randomness.

How it works

You give the list a title - that's the _title_ token that triggers it in a Prompt Processor. Then:

  • options - each line is one selectable option.
  • prefix / suffix - text prepended/appended to every option. Suffix goes at the very end, after any negative text, so read the tooltip before using it there.
  • blocks - comma-separated titles of other lists this one suppresses. If list A blocks list B, selecting from A makes B sit out. That's how you stop "beach" from appearing with "snowsuit."
  • probability - the chance this list fires at all. 0.0 always bypasses, 1.0 always passes, 0.5 is a coin flip. This is the "sometimes include this, sometimes not" control.
  • seed - drives both probability and the option ordering. Same seed, same pick.
  • random - when disabled, the list order doesn't shuffle.

Two advanced widgets trip people up: amount (if > 0, outputs that many items as one comma-joined option) and specific_item (0 bypasses the list entirely, ≥ 1 forces that single item). Both are documented as stopping _multipliers_x2_ and _pickers_3_ from working - so read the tooltips before you stack them.

The optional opt_chained_list input is how lists chain: it appends this list onto an existing chain, letting one node build a multi-list pipeline. opt_override accepts a PROMPT_OVR from MpiPromptOverride to force custom options.

Outputs

Four of them: prompt_list (the PROMPT_LST that feeds a Processor or a chain), seed (the seed after this list ran, so downstream randomness stays coordinated), boolean (whether the list passed its probability gate), and selected_options (the STRING of what was actually chosen - handy for display or logging).

Installing it

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

Restart ComfyUI, or use ComfyUI Manager → search ComfyUi-MpiNodes. No pip deps, no models. The pack is AGPL-3.0 from v1.2.7 (MIT through 1.2.6).

The honest take

The probability gate is the killer feature and the thing wildcard-file systems never give you cleanly. "70% chance of rain, if rain then dark sky and umbrella, and never snow with beach" is a graph of three Prompt Lists with blocks and probabilities - genuinely expressive. Where people get burned: the suffix placement (it lands after negative content), and stacking amount/specific_item with token multipliers. When a prompt comes out missing a section, check the boolean output - a list that rolled under its probability isn't broken, it just chose not to run.

CategoryMpiNodes/PromptGen

Inputs (12)

NameTypeDefaultDescription
titleSTRINGThe title used to trigger this list in a Prompt Processor
prefixSTRINGA handy prefix to add to each option
optionsSTRINGEach line is a selectable option to be added to the prompt
suffixSTRINGA handy suffix to add to each option Be careful as this will be placed at the end of each option, meaning after negative options.
blocksSTRINGLists that this list should block (separated by commas)
amountINT00–100If bigger than 0, it will output the selected 'amount' of items as a single option separated by commas. This will stop _multipliers_x2_ and _pickers_3_ from working!
specific_itemINT-1-1–100If bigger than -1: 0 - Will bypass the list (Ignores 'Probability') 1 or greater - It will output the selected item only. This will stop _multipliers_x2_ and _pickers_3_ from working and overwrite the 'amount' option!
randomBOOLEANtrueWhen disabled the list order will not change
seedINT00–18446744073709550000Affects 'probability' and 'options' order.
probabilityFLOAT1.000–1Probability of this list moving on. 0.0 will always bypass this list and return False 1.0 will always let this list through and return True 0.5 gives both a 50% chance
opt_chained_listoptPROMPT_LST
opt_overrideoptPROMPT_OVR

Outputs (4)

NameTypeDescription
prompt_listPROMPT_LST
seedINT
booleanBOOLEAN
selected_optionsSTRING