Nodes/GALIAIS-Nodes/GALIAIS-Nodes Prompt Inspector
ComfyUI Node

GALIAIS-Nodes Prompt Inspector

Is 'lon hair' a Real Tag? Check Before You Waste a Render

By GALIAIS·Created 3 months ago·Updated 3 months ago· 0
GALIAIS-Nodes Prompt Inspector
  • DB
  • 已识别Tags
  • 未识别
  • 报告JSON
  • 已识别数
  • 未识别数
提示词
DB路径
允许NSFWfalse

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 hair or 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.

CategoryGALIAIS-Nodes/prompt

Inputs (4)

NameTypeDefaultDescription
提示词STRING
DB路径STRING
允许NSFWBOOLEANfalse
DBoptGALIAIS_NODES_DANBOORU_DB

Outputs (5)

NameTypeDescription
已识别TagsSTRING
未识别STRING
报告JSONSTRING
已识别数INT
未识别数INT