Danbooru Tags Upsampler
The node that's secretly just DanbooruTagsUpsampler
- upsampled_prompt
If you searched for this because you saw two "Danbooru Tags Upsampler" nodes in your menu, good instincts - that's the whole story. DanbooruTagsUpsamplerNodeRay is a legacy alias. Both registry keys point at the exact same Python class, expose the identical inputs and outputs, and land in the same Prompt Styling/casual_gamer28 category. The pack's README calls this key a "legacy compatibility key" kept so older saved workflows still load. Nothing about it is different, slower, or newer.
So everything that's true of the canonical node is true here: it's a ComfyUI port of p1atdev's sd-danbooru-tags-upsampler for A1111, and it uses DART, a small LLM trained on Danbooru tags, to complete a sparse prompt like 1girl, solo into a full tag list. No API, no key, no account - it runs the model locally and hands you a plain string.
How it works, briefly
Your prompt gets classified against the bundled tag lists (character.txt, copyright.txt, quality.txt), then the DART model receives a special length token - <|long|> and friends - plus your tags, and generates a completion. The node returns your original prompt joined with the generated tags as upsampled_prompt, which you feed into CLIPTextEncode and on to the KSampler. Wire it into an Illustrious/NoobAI/Pony workflow where the model actually speaks Danbooru tags, and you'll get coherent detail instead of the contradictory nonsense a random tag generator would produce.
The settings that matter are the same list: prompt, tag_length (long is a fine starting point), ban_tags to exclude specific tags or wildcards, and model_backend - default ONNX (Quantized) is the fastest and smallest, while Original is the only backend where negative_prompt_tags + cfg_scale CFG actually works. ONNX rejects CFG. dart-v2-moe-sft is Original-only, and dart-v2-sft ships quantized ONNX only.
Installing it
Same pack, same steps. ComfyUI Manager (search "Danbooru Tags Upsampler") or:
cd ComfyUI/custom_nodes/
git clone https://github.com/rookiestar28/ComfyUI-Danbooru-Tags-Upsampler.git
cd ComfyUI-Danbooru-Tags-Upsampler
python install.py
Dependencies are transformers, optimum[onnxruntime], tokenizers, sentencepiece - torch comes from ComfyUI itself and is intentionally not pinned. Restart, and the DART models download automatically from Hugging Face on first run, so the first generation will hang longer than usual while it fetches them.
The only question that matters here
Which one should you add to a new workflow? Use the canonical DanbooruTagsUpsampler - it's the one the maintainer lists first and the one the pack's documentation, search aliases, and tooltips are built around. If a saved workflow references the NodeRay key it will still load and run identically, so there's no migration emergency. Seeing two identical-looking nodes in your menu isn't a sign something's broken - it's just this pack shipping one node under two names.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | 1girl, solo | Comma-separated Danbooru tags to analyze and expand. |
| model_name | COMBO | dart-v1-sft | Allowlisted DART model. Model files use a pinned revision and may download on first use. |
| tag_length | COMBO | long | Target amount of detail requested from the DART model. |
| seed | INT | 00–4294967295 | Generation seed. Reproducibility can still vary across backends, devices, and library versions. |
| temperature | FLOAT | 1.000.01–5 | Sampling randomness; higher values produce more varied tag choices. |
| top_k | INT | 300–1000 | Limits sampling to the highest-probability tokens; 0 disables this limit. |
| top_p | FLOAT | 1.000–1 | Nucleus-sampling probability mass; 1.0 keeps the full distribution. |
| num_beams | INT | 11–20 | Beam-search width. Larger values use more time and memory. |
| model_device | COMBO | cpu | Requested execution device. Failed CUDA initialization falls back to CPU and is logged. |
| model_backend | COMBO | ONNX (Quantized) | Original supports CFG. ONNX variants enforce ban tags but reject CFG; unavailable artifacts fall back with a warning. |
| max_new_tokens | INT | 1288–512 | Maximum number of new tokens generated for the tag completion. |
| negative_prompt_tagsopt | STRING | Tags used for CFG with the Original backend. ONNX rejects CFG requests. | |
| ban_tagsopt | STRING | Comma-separated tags or supported wildcard patterns to block on every backend. | |
| cfg_scaleopt | FLOAT | 1.51–10 | Classifier-free guidance strength for negative tags; supported only by Original. |
| debug_loggingopt | BOOLEAN | false | Enable detailed node/runtime logs for troubleshooting. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| upsampled_prompt | STRING | The original prompt plus generated Danbooru tag completions. |