ComfyUI Node

Resolver

The stage that finally speaks fluent Danbooru

By kunail0804·Created 2 months ago·Updated 2 months ago· 0
Resolver
  • scene
  • knowledge_base
  • config
  • prompt
  • warnings
  • errors
  • json

The Resolver is the payoff node - the one that turns your checked, structured scene into the actual prompt string your image model can read. It's the final stage of the Scene Compiler pipeline, and it's where the pack's "no invented tags" promise is enforced. Everything before this is language understanding and validation; here, the compiler does what it was built for: look up every concept in the Knowledge Base and join the results into one flat, comma-separated prompt.

Why this matters: comma-separated booru tags are still the default interface on the entire SDXL anime lineage - Illustrious, NoobAI, WAI, Pony V6 all speak them. If you're feeding an Illustrious checkpoint (say, via EasyIllustrious or similar), this is the node that produces the text it wants. And unlike an LLM asked to "write tags," the Resolver can't invent anything: every tag it emits came from a concept you described, matched against a data-only Knowledge Base built from a real Danbooru tag vocabulary. It knows aliases (girlfemale), it can expand related tags (an outfit's parts), and if something isn't in the Knowledge Base, it reports it rather than guessing.

How it works

resolve_scene walks your Scene JSON against the Knowledge Base, applying the resolver settings from the Configuration node: alias mapping, tag expansion (up to resolver_max_expansion_depth), the strict-mode rule that unknown concepts become warnings instead of guesses, and the NSFW filter. Then tags_to_prompt joins the resolved tags with the configured separator - a comma by default - into the final string. Two details worth knowing: the semantic fallback (opt-in, off by default) can rescue near-misses by finding the closest known tag, and the prompt is built in resolution order, which matters because on the SDXL lineage earlier keywords get stronger attention.

Inputs and outputs

Two required inputs, both worth understanding:

  • scene (SCENE) - the checked scene data from the Scene Validator. Don't skip the validator; feeding this node raw Analyzer output works, but the validator catches schema problems first.
  • knowledge_base (KNOWLEDGE_BASE) - from the Configuration node. No Knowledge Base, no prompt.

config is optional; connect the Configuration node to control strict mode, aliases, expansion, and the NSFW filter.

Outputs:

  • prompt (STRING) - the flat prompt. This is what you send to your image workflow.
  • warnings / errors (STRING) - where unknown concepts and failures show up.
  • json (STRING) - the resolved tags in traceable JSON form. This is the pack's accountability feature: every tag can be traced back to the sentence it came from, so a wrong translation is inspectable instead of mysterious.

Installing and the gotchas

cd ComfyUI/custom_nodes
git clone https://github.com/kunail0804/ComfyUI-Scene-Compiler.git

Restart ComfyUI and you're done - the Resolver runs fully offline with no model downloads. A Manager listing is planned but not live yet, so the clone is the reliable path.

The failures you'll actually see: an empty prompt almost always means the knowledge_base input isn't connected (the node will flag it in errors), and concepts you expected in the output can vanish for one of two reasons - strict mode is reporting them as unknown, or the NSFW filter is dropping them because resolver_include_nsfw is off in the Configuration node. Both are visible in warnings. And one honest note: the Resolver won't add quality tags like masterpiece, best quality because you never described them - that's the determinism contract. If you want them on an Illustrious checkpoint, that part is still yours.

CategoryScene Compiler

Inputs (3)

NameTypeDefaultDescription
sceneSCENEThe checked scene data from the Scene Validator.
knowledge_baseKNOWLEDGE_BASEThe Knowledge Base from the Configuration node.
configoptCOMPILER_CONFIGOptional: connect a Configuration node to set resolver options.

Outputs (4)

NameTypeDescription
promptSTRING
warningsSTRING
errorsSTRING
jsonSTRING