DP Random Character
Generate random letter/number strings
- Characters
Heads up on the name: despite what "character" suggests, this isn't a node for generating character descriptions - no hair color, no outfits, no personalities. It generates random characters in the typographic sense: strings of letters and/or numbers, however many you ask for. It's a tiny text utility, and once you know that, it's genuinely handy.
It lives in the utils corner of DesertPixelAi's Desert Pixel pack. Small, single-purpose, and easy to mistake for something fancier than it is.
How it works
Three inputs, and that's the whole node:
Type-random_letter,random_number, orrandom_mixed. Letters only, digits only, or a scramble of both.Case-lowercase,uppercase, ormixed. Only relevant when letters are involved.Num_Chars- how many characters to produce, 1 to 20.
It rolls that many random characters and emits them as a single Characters (STRING) output. Ask for 8 mixed characters and you might get k3Qm9pR2.
What you'd actually use it for
The obvious question is why. A few real uses:
- Unique filename suffixes. Wire
Charactersinto a save node'sextra_textor filename field so every output gets a distinct tag and nothing overwrites anything - useful in big batches. - Cache-busting / forcing re-runs. A changing string in the graph is a cheap way to make a downstream node re-execute.
- Random tokens in a prompt. Occasionally people want a nonsense token to nudge variety; a short random string does that.
- Placeholder / procedural text. Feeding a text-render node (like the pack's DP Words or DP Big Letters) when you want randomized characters on screen rather than a fixed word.
One nice property: it's deterministic per run in the sense that a single queue produces one string and holds it for every node reading that output - so if you route Characters into both a filename and a text overlay, they match. It only re-rolls when the graph re-executes.
It is not a subject or character generator. If you want "a cyberpunk mercenary with a scarred face," that's a different tool - the pack's prompt generators, or just writing it.
How to install it
ComfyUI Manager: search Desert Pixel, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/DesertPixelAi/ComfyUI-Desert-Pixel-Nodes
Restart ComfyUI. Nothing to download. Under the DP category.
Common issues & troubleshooting
You expected character descriptions and got gibberish. That's the name being misleading, not a malfunction - this outputs random text characters. For described characters, look at the pack's prompt-generator nodes instead.
Case seems to do nothing. It only affects letters. If Type is random_number, case is irrelevant - there are no letters to upper- or lowercase.
The string doesn't change between runs. Like any random node, it needs the graph to actually re-execute to re-roll. If nothing upstream or in its own controls has changed and ComfyUI serves a cached result, you'll see the same string; force a re-run.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| Type | COMBO | random_letter | 3 options: random_letter, random_number, random_mixed |
| Case | COMBO | mixed | 3 options: lowercase, uppercase, mixed |
| Num_Chars | INT | 11–20 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Characters | STRING | — |