Randoms Weight Prompt
The weighted slot machine that writes your prompt for you
- text
The weighted slot machine for your prompt
"Randoms Weight Prompt" sounds like it does something complicated. It doesn't. You pick up to eight prompt categories - background, action, clothes, expression, take your pick from 112 of them - and the node rolls a random entry from each category's library, then stitches everything into a ready-to-use prompt. The "Weight" is the part that earns it the name: every slot has a weight slider, so you can decide that the background matters more than the teeth without hand-typing a single set of parentheses.
It lives in clouddreamfly's ComfyUI-PromptWrapper pack, a Chinese-built prompt toolkit whose README is almost entirely about downloading translation models. Don't let that scare you off. This node - like its scenery sibling in the same pack - wants none of those models. Everything it reads ships inside the repo.
How it works
The mechanism is embarrassingly simple, and that's a compliment. The pack bundles one JSONL file per category, in Chinese and English (the action library alone has 529 entries; scenery has 6,000+). Pick a category and the node opens the matching file and grabs line seed % total_lines. Same seed, same category, same pick - every time. Bump the seed and every slot rolls fresh. Each of the eight slots runs on that same seed but against a different file, so you get variety without any randomness you can't reproduce.
Weights are applied in the syntax ComfyUI already speaks: 1.0 drops the tag in plain, anything else wraps it as (tag:1.35). That's stock CLIP attention weighting, and it's exactly where the "know your checkpoint" caveat below lands.
The inputs that matter
- classify1–classify8 - eight dropdowns, 113 options each (112 categories plus
--for "skip this slot"). The categories are booru-flavored: action, age, animal ears, background, clothes, expression, weapon, and a hundred more. - classify1_weight–classify8_weight - sliders from 0 to 2, step 0.05, default 1. The reason to use this node instead of the plain Randoms Prompt next to it. Background at 1.3, teeth at 0.7, and the sampler does the arguing for you.
- seed - drives every pick. This is your variation knob, period.
- enable - master switch; off means the node only passes through your own text.
- language - Chinese or English; picks which bundled dictionary to draw from.
- input_prompt (optional) - a string you can wire in from another node; it's prepended to whatever gets generated.
The output is a single text string, comma-joined, ready to plug straight into a CLIP Text Encode (positive) node.
Where people get burned
The weight syntax only does anything on CLIP-based checkpoints - SDXL, Illustrious, NoobAI, Pony, that lineage. On LLM-encoded models like Anima, Z-Image or Flux 2 Klein, (tag:1.3) isn't honored; the encoder just reads the parentheses and colons as literal characters inside your instruction, which is worse than nothing. Running one of those? Set every weight to 1.0 and let the categories do the work. And even on CLIP models, the sensible range is about 0.5–1.5: above 1.5 you get oversaturation, below 0.5 the concept barely registers.
Also, when you're debugging an output you don't like, fix the seed. Randomizing the seed and three category slots at once tells you nothing about which change mattered.
Install
ComfyUI Manager, search "ComfyUI-PromptWrapper", install, restart. Or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/clouddreamfly/ComfyUI-PromptWrapper
Then restart ComfyUI. No pip dependencies, no model downloads for this node - the data is bundled in the repo. If the pack's translation nodes later complain about missing models, ignore it; you're not using them.
Inputs (20)
| Name | Type | Default | Description |
|---|---|---|---|
| language | COMBO | Chinese | 2 options: Chinese, English |
| classify1 | COMBO | -- | 113 options: --, action, age, animal, animal ears, animal horn, +107 |
| classify1_weight | FLOAT | 1.000–2 | — |
| classify2 | COMBO | -- | 113 options: --, action, age, animal, animal ears, animal horn, +107 |
| classify2_weight | FLOAT | 1.000–2 | — |
| classify3 | COMBO | -- | 113 options: --, action, age, animal, animal ears, animal horn, +107 |
| classify3_weight | FLOAT | 1.000–2 | — |
| classify4 | COMBO | -- | 113 options: --, action, age, animal, animal ears, animal horn, +107 |
| classify4_weight | FLOAT | 1.000–2 | — |
| classify5 | COMBO | -- | 113 options: --, action, age, animal, animal ears, animal horn, +107 |
| classify5_weight | FLOAT | 1.000–2 | — |
| classify6 | COMBO | -- | 113 options: --, action, age, animal, animal ears, animal horn, +107 |
| classify6_weight | FLOAT | 1.000–2 | — |
| classify7 | COMBO | -- | 113 options: --, action, age, animal, animal ears, animal horn, +107 |
| classify7_weight | FLOAT | 1.000–2 | — |
| classify8 | COMBO | -- | 113 options: --, action, age, animal, animal ears, animal horn, +107 |
| classify8_weight | FLOAT | 1.000–2 | — |
| seed | INT | 00–18446744073709550000 | — |
| enable | BOOLEAN | true | — |
| input_promptopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |