Nodes/ComfyUi-MpiNodes/Mpi Prompt List Selector
ComfyUI Node

Mpi Prompt List Selector

A 50/50 coin flip between two entire prompt lists

By MadPonyInteractive·Created 11 months ago·Updated 5 days ago· 3
Mpi Prompt List Selector
  • prompt_list_a
  • prompt_list_b
  • prompt_list
  • boolean
  • seed
probability0.50
seed0

Sometimes the variation you want isn't "pick an option from a list," it's "pick between two whole lists." Day/night scenes, indoor/outdoor, two completely different style directions - Mpi Prompt List Selector takes two PROMPT_LST chains, rolls a seeded probability, and passes exactly one through. It's the A/B router of the ComfyUi-MpiNodes prompt system.

How it works

You feed prompt_list_a and (optionally) prompt_list_b - each can be a single MpiPromptList or a whole chain. The probability slider decides: 0.0 always outputs list A, 1.0 always outputs list B, 0.5 is a perfect coin flip, and anything between biases it accordingly. The seed drives the roll, so the same seed reproduces the same choice - which is the whole point of having a seed here at all.

Two outputs are the useful ones:

  • prompt_list - the winning chain, ready to feed a MpiPromptProcessor.
  • boolean - False if A won, True if B won. Wire this anywhere that needs to know which branch is live, or chain it into a second selector for a weighted cascade.

There's also a seed output that passes the value through so downstream randomness stays coordinated.

Installing it

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

Restart, or grab it from ComfyUI Manager by searching ComfyUi-MpiNodes. No deps, no models - AGPL-3.0 from v1.2.7 (MIT through 1.2.6).

Where it fits

The honest use is A/B variation at the structure level rather than the option level. MpiPromptList already has its own probability for "this list sometimes skips itself"; this node is for when the two candidates are mutually exclusive directions that each carry their own chains, blocks, and probabilities. A classic rig: list A is a "cinematic day exterior" chain, list B is "moody night interior," and you want each run to commit to one vision instead of cross-pollinating tokens. Combine the boolean output with a MpiIfElse and you can even route non-prompt values - a different seed, a different LoRA - to match whichever direction won. That's where the selector stops being a novelty and starts being the backbone of a variation workflow.

CategoryMpiNodes/PromptGen

Inputs (4)

NameTypeDefaultDescription
prompt_list_aPROMPT_LST
probabilityFLOAT0.500–10.0 will always output 'list a' and return False 1.0 will always output 'list b' and return True 0.5 gives both a 50% chance
seedINT00–18446744073709550000
prompt_list_boptPROMPT_LST

Outputs (3)

NameTypeDescription
prompt_listPROMPT_LST
booleanBOOLEAN
seedINT