Nodes/ComfyUi-MpiNodes/Mpi RandPromptGen
ComfyUI Node

Mpi RandPromptGen

A random prompt factory that actually thinks in sections

By MadPonyInteractive·Created 11 months ago·Updated 5 days ago· 3
Mpi RandPromptGen
  • overrides
  • positive
  • negative
  • sections
  • save_preset
preset_folder
pre_positive
indoors_outdoors50
pronoun
shot_type
hair_styles
clothes
pose
expression
light_typetrue
post_positive
seed0

Most random-prompt generators just grab a line from a text file and call it a day. Mpi RandPromptGen is built differently: it composes a prompt from named sections - shot type, hair, clothes, pose, expression, location, lighting - each drawn from a preset list, then assembled into a coherent sentence. It's the difference between "a random string of tags" and "a random person in a random place with consistent grammar."

It's the centerpiece of the ComfyUi-MpiNodes prompt-generation family, and it sits above a filesystem of preset JSON - which is both its power and its learning curve.

How it works

Every run, the node rolls each section and stitches them together with the pack's preset word order and transitions. The sections and their controls:

  • preset_folder - the folder holding your preset lists. The node reads a settings.json plus per-section list files from here, and its defaults ship in the pack's user/prompt_gen_preset/ folder.
  • indoors_outdoors - 0 = indoors, 100 = outdoors, 50 = coin flip. Drives which location/lighting/clothing-set lists get used.
  • pronoun - random, she, he, they, or it.
  • shot_type, hair_styles, clothes, pose, expression - each an enum with random and none options on top of the preset entries.
  • light_type - bright/dark toggle for the lighting section.
  • pre_positive / post_positive - your own fixed text bookending the generated middle.
  • seed - the whole roll is seed-driven, so lock it and the same run reproduces the same prompt.

It outputs positive and negative (the generated strings), sections (the raw section picks, for debugging), and save_preset (a preset object you can hand to MpiRandPromptGenSave to persist a configuration).

Installing it

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

Restart, or ComfyUI Manager → search ComfyUi-MpiNodes. No pip deps or model downloads - but the preset files live inside the pack, so a fresh install has defaults, and your own preset folders are yours to create. AGPL-3.0 from v1.2.7 (MIT through 1.2.6).

The honest take

Two things to know before you fall in love. First, the shipped defaults are aimed at a particular aesthetic - the clothing enums include nude, bikini, lingerie, and the expressions skew playful. If that's not your genre, you'll want your own preset folder fast, and the MpiRandPromptGenOverrideList node is the clean way to swap lists without editing files. Second, this is an adult-content-flavored tool by default; a lot of the community's random-prompt generators are, and it's worth knowing what you're installing alongside the utility nodes. With your own presets it's a genuinely good character-variation engine - the sectioned grammar is the feature, not the bundled content.

CategoryMpiNodes/PromptGen

Inputs (13)

NameTypeDefaultDescription
preset_folderSTRINGpath/to/preset_folder
pre_positiveSTRING
indoors_outdoorsINT500–1000 = indoors 100 = outdoors 50 = 50% chance of either
pronounCOMBO5 options: random, she, he, they, it
shot_typeCOMBO8 options: random, none, close up shot, medium shot, full body shot, selfie shot from above, +2
hair_stylesCOMBO5 options: random, none, long wavy ginger hair in a ponytail, straight long hair with pink highlights, long dark brown hair in buns with orange highlights
clothesCOMBO5 options: random, nude, set, bikini, lingerie
poseCOMBO5 options: random, none, touching hair, hands on hips, crossed arms
expressionCOMBO9 options: random, none, smile, wink, tease, playful, +3
light_typeBOOLEANtrue
post_positiveSTRING
seedINT00–18446744073709550000
overridesoptMPI_RANDPROMPT_OVR

Outputs (4)

NameTypeDescription
positiveSTRING
negativeSTRING
sectionsSTRING
save_presetMPI_PROMPT_PRESET