GALIAIS-Nodes Prompt Inspector
Is 'lon hair' a Real Tag? Check Before You Waste a Render
- DB
- 已识别Tags
- 未识别
- 报告JSON
- 已识别数
- 未识别数
A single misspelled Danbooru tag is a silently ignored tag, and you won't know it until you look at the render and wonder why the hair is wrong. The Prompt Inspector is the pack's answer: paste in any prompt and it splits it into tokens, checks each one against the dictionary, and tells you exactly what's a real tag and what isn't.
It's the "spellcheck for your prompt" node - the one you run before burning a generation on a typo you can't see.
How it works
Give it a 提示词 (prompt) and a DB路径 (DB path) or wired-in DB from the Danbooru DB Loader, plus 允许NSFW (which gates whether explicit tags count as recognized). The node tokenizes your prompt on commas and pipes, strips attention-weight wrappers like (tag:1.2) and leading @ marks, then looks each token up in the dictionary with exact matching.
Outputs, and they're all useful:
- 已识别Tags (recognized tags) - every token that resolved to a real dictionary tag.
- 未识别 (unrecognized) - everything that didn't. This is the output that catches
lon hairor a made-up artist name. - 报告JSON - the full per-token report.
- 已识别数 / 未识别数 (counts) - numbers you can actually act on: if 未识别数 is zero, your prompt is clean.
Installing it
It's part of 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. It does need a dictionary loaded - without a DB, everything comes back unrecognized and the node is useless, which is the most common "why is it broken" moment. Field labels are Chinese (提示词, 未识别, 已识别数), as with the whole pack.
Where it fits
The natural spot is as a pre-render check: wire your composed positive prompt in, glance at 未识别数, and fix the list before the sampler runs. Or use it retroactively - when a render comes out wrong, run the prompt through the inspector to see which tags the dictionary doesn't even know. One honest limitation: matching is exact, so near-misses show up as unrecognized rather than being auto-corrected. That's deliberate - the node reports, it doesn't guess - but it means the list is what it is. And if you're doing heavier quality work, the V2 version of this node (Prompt Inspector V2) adds a quality score, an issue list, and an NSFW count, and takes a project config so it inherits your DB and NSFW policy. For a quick pass, this one is the right weight.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| 提示词 | STRING | — | |
| DB路径 | STRING | — | |
| 允许NSFW | BOOLEAN | false | — |
| DBopt | GALIAIS_NODES_DANBOORU_DB | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| 已识别Tags | STRING | — |
| 未识别 | STRING | — |
| 报告JSON | STRING | — |
| 已识别数 | INT | — |
| 未识别数 | INT | — |