Nodes/GALIAIS-Nodes/GALIAIS-Nodes Danbooru Dictionary Info
ComfyUI Node

GALIAIS-Nodes Danbooru Dictionary Info

Five Numbers That Tell You If Your Tag Database Actually Loaded

By GALIAIS·Created 3 months ago·Updated 3 months ago· 0
GALIAIS-Nodes Danbooru Dictionary Info
  • DB
  • 词典信息JSON
  • 总词条
  • 已翻译
  • 模板数
DB路径

Most of the trouble people hit with GALIAIS-Nodes isn't the nodes - it's the database sitting under them. The Danbooru dictionary file is a big sqlite file you bring in yourself, and when it's missing, stale, or the wrong format, every tag resolver in the pack quietly returns nothing. Danbooru Dictionary Info is the two-second way to check what you actually loaded. It's a pure diagnostics node: it opens the dictionary, reads its stats, and hands them to you.

You reach for it when a workflow that used to produce tags suddenly produces nothing, or when you've swapped in a new dictionary download and want to confirm it's real before you rebuild everything around it.

How it works

It takes a DB路径 (DB path) - or you can wire in an already-loaded DB from the Danbooru DB Loader, in which case the path input becomes optional. Then it opens the dictionary and returns four things:

  • 词典信息JSON - the full stats blob as JSON, the one you'd wire into a text viewer if you want the whole picture.
  • 总词条 (total entries) - how many tags the dictionary knows. A real dictionary is in the hundreds of thousands; single digits means you're pointing at the wrong file.
  • 已翻译 (translated) - how many tags carry a Chinese label. The pack is Chinese-first, and its "smart" search matches against these labels, so a dictionary with few translations will behave noticeably worse in the query selectors.
  • 模板数 (templates) - how many ready-made prompt templates ship inside the dictionary.

That last number is the sleeper. The dictionary isn't just a tag list; it carries template data that nodes like PromptTemplate and the composer read. If 模板数 is 0, the file is a bare tag dump and template-backed nodes will find nothing.

Installing and using it

It's part of the GALIAIS-Nodes pack, so install the pack once:

cd ComfyUI/custom_nodes
git clone https://github.com/GALIAIS/GALIAIS-Nodes.git

Restart ComfyUI (or install via ComfyUI Manager, search "GALIAIS-Nodes"). No Python dependencies, no downloads - except the dictionary itself, from the separate GALIAIS/Danbooru-Tag-Database repo. As with the whole pack, the field labels are Chinese: 词典信息JSON, 总词条, 已翻译, 模板数.

Where it fits

Honestly, this node is a debugging aid more than a workflow citizen. You don't want it in your final graph - it's the node you drop in, glance at, and delete. The smarter move is to keep the DB Loader's 总词条/已翻译 outputs wired to a display node if you want persistent confirmation. If the numbers look wrong, the usual culprits are a stale runtime DB (rebuild it with the Runtime DB Builder, then clear caches via DB Cache Control) or a path pointing at the full dictionary when a .runtime.db sibling has gone stale. A thin node, but it saves the kind of ten-minute head-scratches that are much more annoying than this.

CategoryGALIAIS-Nodes/prompt

Inputs (2)

NameTypeDefaultDescription
DB路径STRING
DBoptGALIAIS_NODES_DANBOORU_DB

Outputs (4)

NameTypeDescription
词典信息JSONSTRING
总词条INT
已翻译INT
模板数INT