DP Dynamic Random Styler
Random themed prompts for face-swap workflows, built from plain text files
- prompt
- negative
- theme_info
- selected_theme
Ever build a face-swap workflow, load in your photo, and then just... sit there typing a prompt? This node is the pack's answer to that blank box. Drop it in, pick a theme, and it assembles a complete positive and negative prompt from text files - different outfit, pose, color scheme, and background every run if you want it to be. It's the namesake of the DesertPixelAi/comfyui-dp-them-styler pack, and it's the one node the whole pack orbits around.
The pitch is narrow and honest: it's built for SDXL models feeding a face-swap pass (a ReActor or ACE++-style swap at the end of the graph - the classic pipeline the KB's identity-preservation notes). That's why every theme's base template starts with "photo of" and includes "bare face, looking at camera" plus "solo scene." The prompts are written so the face region stays clean, visible, and unmasked, which is exactly what a swap needs to work well. Semi-realistic render, no helmets, no glowing eyes - read the theme's negative.txt and you'll see all of that banned in one long list.
How it works
Themes live in folders under the pack's data/ directory. Five ship with it: Avatar The Last Airbender Bender, Call of Duty Military Operative, Comics Super Hero, Overwatch Hero, and Street Fighter Tournament Warrior. (The README claims "29+ themes" - the actual repo has five. The folder count is what matters, not the marketing.)
Inside each folder, every .txt file becomes a {placeholder}. base_prompt.txt holds the template - only its first line is used - and any other file is a list of candidate values, one per line. So pose.txt becomes {pose}, costume_design.txt becomes {costume_design}, and so on. The node picks one random line for each placeholder, then fills in the global ones.
Three inputs matter, and honestly that's most of it:
- theme - which folder to draw from. The dropdown is built by scanning
data/, so it updates as you add themes. - generation_mode -
randomizegives you a fresh combination every run;fixedreuses the last generated combination for that theme, which is how you lock a look you liked. - gender_selection -
male,female, orrandom.
Then two optional knobs: age (0–120, default 25) and subject (free text that fills a {subject} placeholder if the template has one). The age feeds both {age} (the exact number) and {age_category} (child / teenager / young adult / adult / middle aged / elderly).
Outputs
You get four strings: prompt, negative, theme_info (a text preview of what the theme folder contains - file counts and sample values), and selected_theme. Wire prompt and negative into a CLIP Text Encode (or straight into whatever prompt node your sampler uses) and you're generating.
Making your own themes
This is the node's real superpower: copy a theme folder, edit base_prompt.txt, add your own .txt lists with ~20 lines each, and drop it in data/. Reload the workflow and it appears in the dropdown. One gotcha - the placeholder name has to match the filename exactly. The shipped themes use background.txt (not background_and_atmosphere.txt like the README says), so if your template says {background} but your file is atmosphere.txt, you'll get a literal {background} sitting in your prompt. The node prints a warning in the console when that happens, so check the terminal if your output looks off.
Install
From ComfyUI Manager, search "ComfyUI DP Dynamic Random Styler" (or comfyui-dp-them-styler) and install. Or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/DesertPixelAi/comfyui-dp-them-styler
then restart ComfyUI. It pulls in transformers, torch, Pillow, and numpy - nothing exotic, and no model files to download for this node. One honest caveat: this pack has essentially no community footprint - you won't find it discussed on r/comfyui, and it looks like a personal-project build that got published. Works fine for what it is; just don't expect an active issue tracker.
If a prompt comes out with a placeholder left in it, that's a data problem in your theme folder, not the node. And if you want reproducible output, randomize once, then flip to fixed before saving the workflow.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| theme | COMBO | Avatar The Last Airbender Bender | 5 options: Avatar The Last Airbender Bender, Call of Duty Military Operative, Comics Super Hero, Overwatch Hero, Street Fighter Tournament Warrior |
| generation_mode | COMBO | randomize | 2 options: fixed, randomize |
| gender_selection | COMBO | random | 3 options: male, female, random |
| ageopt | INT | 250–120 | — |
| subjectopt | STRING | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| negative | STRING | — |
| theme_info | STRING | — |
| selected_theme | STRING | — |