Random Artist String
A wildcard picker over 30,000 artists
- text
The second node in ComfyUI-Power-Artist-Loader is a randomizer, and it's sneakily the most fun one. RandomArtistString picks artist names from a bundled database of roughly 30,000 Danbooru-derived artists - complete with aliases and post counts - formats them into a prompt chunk, and hands you a STRING. Every time the workflow runs, it rolls again. Think of it as a wildcard system squeezed into a single node, no external file required.
Why you'd reach for it
Exploration and batch variety. You're on a tag-lineage anime model (Illustrious, NoobAI, Pony), you have a scene prompt you like, and you want to see it in twenty different styles. Feed this node's output into your positive prompt, queue twenty runs, and let the sampler do the style roulette for you. Or use it as a brainstorming tool: run it once, look at which artists it drew, and let that kick off a directed search. It's the pack's answer to "I don't know what I want, but I want it different."
The inputs that matter
There are ten, but a beginner lives in five:
- preselectName - comma-separated artist names you insist on. They're used first, up to the target count.
- excludeName - comma-separated names to never draw.
- targetCount - how many artists to output, 1–20, default 3. (The tooltip says it plainly: "Final output count (1-20)".)
- mode -
Standard(bare names),Weighted(each wrapped as(name:weight)with a random weight), orBracket(nested brackets). - postCountFilterMode + postCountThreshold - filter by how popular an artist is.
gtthreshold = only names with more Danbooru posts (famous artists);lt= obscure ones.
The rest are tunable details: standardWeightMin/Max bound the random weights (defaults 0.5–1.5), creativeBracketStyle picks () {} [], creativeNestLevels sets bracket depth (0 = random 1–5), and separator is what joins the names (default comma).
How it works
The mechanism is refreshingly simple. It loads db/artists.json (each entry: a lowercase Danbooru-style name like haruyama_kazunori, a list of aliases, and a post_count), parses your preselected and excluded lists, filters the pool by post count if you asked, shuffles, and fills the rest of the target count from the pool. Preselected names always come first and can't be drawn twice. Then it formats per mode and joins with your separator.
The output is a single STRING named text. The node marks itself as always-changed, so it re-randomizes on every queue - that's what makes the batch-variation trick work.
One frontend nicety the schema doesn't show: the node's JavaScript adds Pick Preselected and Pick Exclusions buttons. They open a searchable multi-select panel over the full 30,000-name database, which matters because the node's dropdown combo only exposes the first 300 names alphabetically. Type, search aliases, click. Much better than hand-typing names.
The caveats
- The names are Danbooru-style: lowercase, underscores, and often obscure. That's a feature for tag models - the vocabulary is exactly what Pony/Illustrious/NoobAI were trained on - but a non-tag model will shrug at most of them.
WeightedandBracketmodes are CLIP attention syntax. On LLM-encoder models (Flux 2, Anima, Z-Image) the weights are discarded, so those modes are wasted there; use Standard.- Keep
targetCountmodest. Five random artists will fight each other; twenty is a good way to get a muddy image. The popularity filter exists precisely so you can bias toward names that actually show up in training data.
Installing
Same pack, same install:
cd ComfyUI/custom_nodes
git clone https://github.com/hanL34/ComfyUI-Power-Artist-Loader.git
Restart ComfyUI, done. No extra Python dependencies - the code only uses the standard library plus what ComfyUI already bundles - and no model files to fetch. The ~30k artist database ships inside the repo, so it works offline from the first launch.
Troubleshooting
Not much to go wrong, honestly. If preselectName doesn't seem to register, check you typed exact names - the node matches what you type, not fuzzy aliases, so "Toriyama" alone won't match akira_toriyama. If the picker panel shows only a handful of names, give the DB a second to load. And if your output looks like name,name,name with no commas... check separator - an older workflow may have migrated a null value in, which the frontend repairs, but it's worth a glance. For a tiny utility node it punches well above its weight: one node, thirty thousand artists, endless style roulette.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| preselectName | STRING | Multi-select: comma-separated main names | |
| excludeName | STRING | Multi-select: comma-separated names to exclude | |
| targetCount | INT | 31–20 | Final output count (1-20) |
| mode | COMBO | Standard | Output formatting mode |
| standardWeightMin | FLOAT | 0.50–2 | Weight lower bound (0-2) |
| standardWeightMax | FLOAT | 1.50–2 | Weight upper bound (0-2) |
| creativeBracketStyle | COMBO | paren | Bracket style: (), {}, [] |
| creativeNestLevels | INT | 00–5 | Bracket nest levels; 0 = random 1-5 |
| postCountFilterMode | COMBO | none | Filter by post_count: greater/less than threshold |
| postCountThreshold | INT | 00–10000000 | Post count threshold |
| separator | STRING | , | Output separator; typically , |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |