Nodes/ComfyUi-MpiNodes/Mpi RandPromptGen Order
ComfyUI Node

Mpi RandPromptGen Order

Take control of the sentence your random prompts make

By MadPonyInteractive·Created 11 months ago·Updated 5 days ago· 3
Mpi RandPromptGen Order
  • overrides
  • overrides
section_1shot_type
transition_1.
section_2pre_positive
transition_2
section_3hair
transition_3.
section_4clothes
transition_4.
section_5pose
transition_5.
section_6expression
transition_6.
section_7location
transition_7.
section_8light
transition_8.
section_9post_positive
transition_9

Mpi RandPromptGen assembles a prompt from sections, and by default it does it in a fixed order: shot type, then a pre-positive, then hair, clothes, pose, expression, location, lighting, post-positive. That order is baked into the pack's preset settings - and it might not be the order that reads well for your subject. Mpi RandPromptGen Order lets you rearrange the whole assembly: you pick which section comes first, second, third, and what separator (a period, a comma, a newline) goes between them.

How it works

Nine sections are available, and you lay out the sequence one at a time:

  • section_1section_9 - each a dropdown choosing one of: shot_type, pre_positive, hair, clothes, pose, expression, location, light, post_positive. The defaults mirror the stock order.
  • transition_1transition_9 - the string placed after each section. The defaults are mostly ". " with empty transitions around the pre/post positives.

The optional overrides input takes an existing MPI_RANDPROMPT_OVR bundle so order nodes can be chained, and the single output - overrides - wires into Mpi RandPromptGen's overrides socket. The ordering instructions ride along with any other overrides already in the bundle, which is how several control nodes compose onto one generator.

Installing it

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

Restart, or ComfyUI Manager → search ComfyUi-MpiNodes. No deps, pure Python, AGPL-3.0 from v1.2.7 (MIT through 1.2.6).

When it matters

Prompt grammar genuinely affects how a model weighs things - a subject early in the sentence tends to get more attention, and a comma-separated tag-dump reads differently than a natural sentence. If your generated prompts feel like the model is ignoring the location or over-weighting the clothes, reordering so the important sections lead is a real lever. The transition strings are where the polish lives: ". " gives you full sentences, ", " gives tag lists. The trap is subtle and universal here - set section_9 to something and forget its transition, and you get no separator before your post_positive, gluing two ideas together. Give every transition an intentional value, even if it's empty.

CategoryMpiNodes/PromptGen

Inputs (19)

NameTypeDefaultDescription
section_1COMBOshot_type9 options: shot_type, pre_positive, hair, clothes, pose, expression, +3
transition_1STRING.
section_2COMBOpre_positive9 options: shot_type, pre_positive, hair, clothes, pose, expression, +3
transition_2STRING
section_3COMBOhair9 options: shot_type, pre_positive, hair, clothes, pose, expression, +3
transition_3STRING.
section_4COMBOclothes9 options: shot_type, pre_positive, hair, clothes, pose, expression, +3
transition_4STRING.
section_5COMBOpose9 options: shot_type, pre_positive, hair, clothes, pose, expression, +3
transition_5STRING.
section_6COMBOexpression9 options: shot_type, pre_positive, hair, clothes, pose, expression, +3
transition_6STRING.
section_7COMBOlocation9 options: shot_type, pre_positive, hair, clothes, pose, expression, +3
transition_7STRING.
section_8COMBOlight9 options: shot_type, pre_positive, hair, clothes, pose, expression, +3
transition_8STRING.
section_9COMBOpost_positive9 options: shot_type, pre_positive, hair, clothes, pose, expression, +3
transition_9STRING
overridesoptMPI_RANDPROMPT_OVR

Outputs (1)

NameTypeDescription
overridesMPI_RANDPROMPT_OVR