Mpi RandPromptGen Order
Take control of the sentence your random prompts make
- overrides
- overrides
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_1…section_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_1…transition_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.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| section_1 | COMBO | shot_type | 9 options: shot_type, pre_positive, hair, clothes, pose, expression, +3 |
| transition_1 | STRING | . | — |
| section_2 | COMBO | pre_positive | 9 options: shot_type, pre_positive, hair, clothes, pose, expression, +3 |
| transition_2 | STRING | — | |
| section_3 | COMBO | hair | 9 options: shot_type, pre_positive, hair, clothes, pose, expression, +3 |
| transition_3 | STRING | . | — |
| section_4 | COMBO | clothes | 9 options: shot_type, pre_positive, hair, clothes, pose, expression, +3 |
| transition_4 | STRING | . | — |
| section_5 | COMBO | pose | 9 options: shot_type, pre_positive, hair, clothes, pose, expression, +3 |
| transition_5 | STRING | . | — |
| section_6 | COMBO | expression | 9 options: shot_type, pre_positive, hair, clothes, pose, expression, +3 |
| transition_6 | STRING | . | — |
| section_7 | COMBO | location | 9 options: shot_type, pre_positive, hair, clothes, pose, expression, +3 |
| transition_7 | STRING | . | — |
| section_8 | COMBO | light | 9 options: shot_type, pre_positive, hair, clothes, pose, expression, +3 |
| transition_8 | STRING | . | — |
| section_9 | COMBO | post_positive | 9 options: shot_type, pre_positive, hair, clothes, pose, expression, +3 |
| transition_9 | STRING | — | |
| overridesopt | MPI_RANDPROMPT_OVR | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| overrides | MPI_RANDPROMPT_OVR | — |