Danbooru Tag Importer (Anima)
Steal a Danbooru post's tags without touching the API
- ARTIST_PROMPT
- CHARACTER_PROMPT
- BACKGROUND_PROMPT
- ALL_RAW_TAGS
Danbooru is the source of truth for anime tags, and if you've ever hand-typed a character's tag set from memory you know how much you're leaving on the table. DanbooruTagImporter (Anima) pulls the full tag list off a real Danbooru post - artist, character, copyright, hair, pose, everything - and hands it to you sorted into Anima-friendly prompt blocks. No API key, no login, and one of the cleverest network-workarounds in a custom node you'll ever see.
The architecture trick that makes it work
Here's what makes this node special, and it's worth understanding before you judge it on first run. Danbooru sits behind Cloudflare, which blocks most server-side scraping, and the node's author solved that by not calling Danbooru from Python at all. Instead:
- The node has a button in its UI (a small JS extension ships with the pack)
- When you click it, your browser fetches
https://danbooru.donmai.us/posts/<id>.jsondirectly - the browser is a real browser, so it sails past Cloudflare, and it carries whatever login state you have - The browser posts that JSON to a custom backend route the pack registers (
/anima/danbooru_analyze), where Python categorizes the tags using the same 37k-entrytag_category.jsonthe Text Categorizer uses - The result is cached to disk in
danbooru_cache/<post_id>.json, so it only needs the one fetch
The node itself never touches the network. It reads only from that cache. That's the entire reason it works where other Danbooru importers die on a 403.
The workflow
Input a url like https://danbooru.donmai.us/posts/1234567, click the analyze button (the preview box shows progress and then a breakdown of what was cached), and the node gives you the same four outputs as the Text Categorizer:
ARTIST_PROMPT- the post's artist tagsCHARACTER_PROMPT- character, copyright, species, body, face, hair, clothing, pose, action, and friendsBACKGROUND_PROMPT- camera & composition, background, environmentALL_RAW_TAGS- every tag, flattened
Each category also has its own boolean toggle (all on by default except uncategorized), so you can exclude hair tags or keep only the artist. Tags are converted from underscores to spaces and parens get escaped for prompt safety.
The gotchas - read these before you rage
- You must click the button first. Until you do, the node has no cache entry and returns an error string in
ALL_RAW_TAGS("데이터가 없습니다... please click analyze"). This trips everyone. The node does not auto-fetch - by design, to avoid hammering Danbooru. - Login-walled content. The fetch runs in your browser, so posts that require a Danbooru login (most NSFW posts) only work if you're logged in in that browser - the same browser tab running ComfyUI. It inherits your cookies, which is both the feature and the limitation.
- It's a cache. Fetch once per post and it's stored forever; fetch a post with the same ID twice and the second run reads disk. If a post is deleted after you cached it, you still have the data.
- CORS and adblockers. The browser fetch is the whole mechanism, so if a privacy extension blocks the Danbooru request, the preview will show an HTTP error and nothing gets cached. Whitelist danbooru.donmai.us if you're running aggressive blockers.
Install
Part of the ComfyUI Seed Wildcard Pack:
cd ComfyUI/custom_nodes
git clone https://github.com/sinanzoo2nd/ComfyUI-Seed-Wildcard-Pack
or ComfyUI Manager → search Seed Wildcard → install, restart. The requests library gets used by the pack's Python side, but it's present in essentially every ComfyUI install. No model files, no keys, no external data to download - the 37k-tag table and the JS extension ship in the repo.
Who this is for
If you generate Anima (or Illustrious/NoobAI-class) anime images and want real Danbooru-accurate tag sets for a character or scene you like, this is the fastest path from "I like that post" to "I have its full tag list organized." The browser-fetch architecture is a genuinely clever bit of engineering for a problem - Cloudflare-blocked Danbooru - that has killed half a dozen similar nodes. Just remember the button.
Inputs (20)
| Name | Type | Default | Description |
|---|---|---|---|
| url | STRING | https://danbooru.donmai.us/posts/... | — |
| artist | BOOLEAN | true | — |
| character | BOOLEAN | true | — |
| copyright | BOOLEAN | true | — |
| person | BOOLEAN | true | — |
| species_traits | BOOLEAN | true | — |
| body | BOOLEAN | true | — |
| face | BOOLEAN | true | — |
| hair | BOOLEAN | true | — |
| appearance | BOOLEAN | true | — |
| clothing | BOOLEAN | true | — |
| accessory | BOOLEAN | true | — |
| state_emotion | BOOLEAN | true | — |
| pose | BOOLEAN | true | — |
| action | BOOLEAN | true | — |
| camera_composition | BOOLEAN | true | — |
| background | BOOLEAN | true | — |
| environment | BOOLEAN | true | — |
| uncategorized | BOOLEAN | false | — |
| preview_boxopt | STRING | 버튼을 눌러 분석하세요. | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| ARTIST_PROMPT | STRING | — |
| CHARACTER_PROMPT | STRING | — |
| BACKGROUND_PROMPT | STRING | — |
| ALL_RAW_TAGS | STRING | — |