CreaPrompt node with weight
Random prompts, now with attention weights
- prompt
- seed
CreaPrompt node 4 is the random-prompt engine from the rest of this pack with one addition: every category gets a weight slider. Where the other nodes just pick a line and join everything with commas, this one wraps the picked line in SDXL attention-weight syntax - (line:1.3), (line:0.7), that shape - so you can tell the model how much each random element should matter.
It reads the csv+weight folder, which ships with a tighter, portrait-focused set: Woman, Haircuts_Thomas_Buyle, Haircolors_Thomas_Buyle, Woman_Dress_Malapris_PJ, and Films_Scenes_Malapris. The star of that lineup is Films_Scenes_Malapris - 64 long, atmospheric, noiry film-scene descriptions ("A detective peers through a foggy window...") that are the best raw material in the whole pack for cinematic prompts. Weigh that one at 1.3-1.5 and it anchors the whole image; weigh the subject lower and you get a mood piece rather than a portrait.
How the weight works
Each category has a companion input named CategoryName: Weight, a FLOAT from -3 to 3, default 1. The mechanism in the source is simple: if the weight is 1 or 0, the value is used as-is; otherwise it's wrapped as (value:weight). Negative weights push the model away from that element - the CLIP-era way to say "definitely no red hair" without a negative prompt.
The catch is one worth reading before you build around it: weight syntax only means something on CLIP-based models. On SDXL, Illustrious, Pony and friends, (word:1.4) genuinely boosts attention. On an LLM-encoded model - Flux, Z-Image, Krea 2 - those parentheses are fed to the text encoder as literal punctuation, which is worse than nothing: it's not ignored, it's spelled out inside your prompt. If you're on one of those checkpoints, leave every weight at 1 (or 0) and this node behaves exactly like node 1.
The other inputs
Standard pack trio: Prompt_count (1–1000 prompts, one per line), CreaPrompt_Collection (enabled ignores categories and pulls whole prompts from collection.txt), and seed for reproducibility. Outputs are prompt (STRING) and seed (INT) - prompt into CLIP Text Encode, seed back into the KSampler. The weight workflow shipped in the pack's WF folder shows the intended wiring with the CreaPrompt Multi Prompts node for batched runs.
Installing it
Manager, search "CreaPrompt", or:
cd ComfyUI/custom_nodes
git clone https://github.com/tritant/ComfyUI_CreaPrompt
Restart. No pip dependencies, no API keys, offline. Author's recommended pairing is the CreaPrompt_Ultimate checkpoint (CivitAI 383364), an SDXL Lightning/Hyper model for low-CFG runs - which is exactly the setting where attention weights still do their job.
Common issues
- Weights "do nothing." Almost always a checkpoint mismatch - see above. Check what encoder your model uses before touching the sliders.
- New CSVs need a reload into
csv+weight/and a node re-add to appear as dropdowns. collection.txtis mandatory in that folder; deleting it throws an error.- Don't go crazy with 1.5+. Above that range you start getting oversaturation and distortion on SDXL; the practical band is 0.5–1.5.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| Haircolors_Thomas_Buyle | COMBO | disabled | 57 options: disabled, 🎲random, Ashy , Auburn , Auburn hair , Balayage , +51 |
| Haircolors_Thomas_Buyle: Weight | FLOAT | 1.00-3–3 | — |
| Woman_Dress_Malapris_PJ | COMBO | disabled | 692 options: disabled, 🎲random, Accessories Cashmere scarf in a vibrant blue to keep warm , Accessories Delicate silver earrings with freshwater pearls , Accessories Statement gold necklace with a chunky pendant , Accessories Straw hat with a wide brim for a sunny day , +686 |
| Woman_Dress_Malapris_PJ: Weight | FLOAT | 1.00-3–3 | — |
| Woman | COMBO | disabled | 43 options: disabled, 🎲random, a african woman with sexy pose , a angry woman , a beautiful cinematic sexy female , a beautiful cinematic sexy female saiyan , +37 |
| Woman: Weight | FLOAT | 1.00-3–3 | — |
| Haircuts_Thomas_Buyle | COMBO | disabled | 58 options: disabled, 🎲random, Afro Hair , Bald , Beehive haircut , Bleached spikes , +52 |
| Haircuts_Thomas_Buyle: Weight | FLOAT | 1.00-3–3 | — |
| Films_Scenes_Malapris | COMBO | disabled | 64 options: disabled, 🎲random, A detective peers through a foggy window into a dimly lit room, where a clandestine meeting is taking place between two shadowy figures, their faces obscured by the haze of cigarette smoke. , A detective sifts through a cluttered desk, illuminated by the soft glow of a desk lamp, searching for clues amidst scattered papers and half-empty whiskey glasses. , A detective's office, illuminated by the soft glow of a desk lamp, is shrouded in darkness save for the flickering light of a neon sign outside, casting long shadows across the worn wooden floor. , A femme fatale lounges seductively on a velvet chaise longue, the dim light casting alluring shadows across her face as she gazes at the viewer with a hint of danger in her eyes. , +58 |
| Films_Scenes_Malapris: Weight | FLOAT | 1.00-3–3 | — |
| Prompt_countopt | INT | 11–1000 | — |
| CreaPrompt_Collectionopt | COMBO | disabled | 2 options: disabled, enabled |
| seedopt | INT | 00–1125899906842624 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| seed | INT | — |