GALIAIS-Nodes Danbooru Taxonomy Select
Pick From a Curated Tag Category Instead of Guessing at Spellings
- DB
- Tag黑名单
- 提示词
- 元信息JSON
The Danbooru dictionary isn't a flat pile of tags - it's organized into a taxonomy of curated categories. Danbooru Taxonomy Select is the node that lets you work with that structure: you give it a category (taxonomy) ID, and it filters your selected tags to that category, dedupes and weights them, and can even pull random tags from inside it.
If the Query Select is the search box and the Tag Resolver is the janitor, this is the filing system. It's the node you reach for when you want "a hair color from the hair-color category" rather than "the one specific tag I typed correctly."
How it works
Two string inputs drive it: TaxonomyID (which curated category to work within) and Tags (the tags you've picked, one per line or comma-separated). The node validates each tag against that taxonomy in the loaded dictionary, applies a 统一权重 (uniform weight), and dedupes with 去重 (on by default). 允许NSFW gates explicit content.
Then there's the random layer, which is the fun part:
- 启用随机Tag - off by default. When on, the node pulls 随机数量 random tags from within the given taxonomy, using 随机种子 (random seed) so results are reproducible. A
随机数量of 0 means no random filling. - Tag黑名单 (optional) - wire in a blacklist and random picks skip those tags. If you've ever had a random selector hand you a tag you didn't want on a character, you'll appreciate this.
Outputs: 提示词 (the final, joined, deduped, weighted tag string - this is the one you wire onward) and 元信息JSON (everything the node did: count, seed, random items, blacklist size).
A detail worth knowing: the two fields are marked as lazy in the source (galiais_nodes_danbooru_lazy), meaning the pack's web frontend populates and refreshes them from the DB as you interact, rather than you hand-typing taxonomy IDs. In practice, that means this node pairs with the pack's DOM UI - you click, it fills.
Installing it
It's in the GALIAIS-Nodes pack:
cd ComfyUI/custom_nodes
git clone https://github.com/GALIAIS/GALIAIS-Nodes.git
Restart ComfyUI, or install via ComfyUI Manager ("GALIAIS-Nodes"). No Python dependencies. Needs a dictionary - DB路径 or a wired-in DB from the Danbooru DB Loader. Field labels are Chinese, as throughout the pack (启用随机Tag, 随机数量, 随机种子, …).
Where it's worth it
The taxonomy angle pays off most in character and style work, where you want controlled variation: one seed line for outfit category, one for hair style, one for lighting - each a random draw within a sensible category, each reproducible. The trap is treating it as a general tag picker; without a valid TaxonomyID the random path has nothing to draw from and you'll just get your manually typed tags back. If random ever feels broken, check that the taxonomy actually exists in your dictionary - some downloads ship without full taxonomy data, and that's when 随机数量 quietly yields nothing.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| TaxonomyID | STRING | — | |
| Tags | STRING | — | |
| DB路径 | STRING | — | |
| 允许NSFW | BOOLEAN | false | — |
| 去重 | BOOLEAN | true | — |
| 统一权重 | FLOAT | 1.000–5 | — |
| 启用随机Tag | BOOLEAN | false | — |
| 随机数量 | INT | 10–50 | — |
| 随机种子 | INT | 00–4294967295 | — |
| DBopt | GALIAIS_NODES_DANBOORU_DB | — | |
| Tag黑名单opt | GALIAIS_NODES_TAG_BLACKLIST | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| 提示词 | STRING | — |
| 元信息JSON | STRING | — |