Zako-Danbooru-Search
Search Danbooru From Inside ComfyUI
- prompt
If you prompt an Illustrious, NoobAI, or any Danbooru-trained anime model, the tags are the language - the board's exact vocabulary is literally what your model learned. So the obvious workflow, find a post you like, copy its tags, feed them to your checkpoint, has always meant alt-tabbing to a browser and wrestling an archive that's a quarter questionable or explicit. ZakoDanbooruSearch pulls the whole loop into a ComfyUI modal: type a tag, scroll a grid of thumbnails, click one, and the tag string lands in your graph. It's the pack's one node that touches the network at all, and it's worth understanding before you wire it up.
How it works
Nearly all the logic lives in the frontend. Hit search and a modal opens. Type a Chinese tag and the node first translates it to English through a local SQLite lookup against a bundled 300,000-entry Chinese↔English tag map - no LLM call for that step. Then it queries Danbooru's posts.json API, loads the first 200–300 posts in parallel, sorts by score, and shows five columns of thumbnails with like counts, lazy-loading more as you scroll. The image proxying and the translation both run through the pack's own routes on your ComfyUI server, so nothing needs a third-party service.
Click an image and the node builds your prompt, splitting the post into artist / copyright / character / general categories and joining them with commas and newlines. The tag格式 dropdown controls what lands in the output:
- 全部 - everything, artist included
- 不含画师 (default) - artist stripped, so you get the scene without the style anchor
- anima画师 - artist tags included, prefixed with
@, the Danbooru convention for activating an artist tag
Output is a single prompt STRING. It slots in exactly where a text box does - wire it to CLIP Text Encode, or run it through the pack's Tag-Translate/Prompt-Enhance if the raw tags need tidying.
The inputs that matter (and the proxy weirdness)
tag格式 you'll touch constantly. The other two are optional, and honestly, if you're not in mainland China you can ignore both:
- api_key - optional Danbooru credentials in
username:api_keyformat, for higher request limits or searches that need auth. Anonymous browsing works. - proxy_url - this is the one that confuses people. The README is written for a Chinese audience, where
danbooru.donmai.usis often blocked. If that's you, you deploy the pack's Vercel or Cloudflare Workers proxy layer and paste its domain here. If you can reach Danbooru normally, leave it empty - setting it routes every search and image through your proxy and slows things down for nothing.
One genuinely good design choice: api_key and proxy_url are stored in browser localStorage and never serialized into the workflow JSON. You can share the workflow file without leaking your Danbooru credentials - more than most API-bearing nodes bother to do. The proxy-image backend route also refuses to fetch anything that isn't a *.donmai.us host, which keeps it from becoming an open SSRF pipe.
Installing and gotchas
Install is the pack install: ComfyUI Manager, search "Zako-Prompt-Tools", or:
cd ComfyUI/custom_nodes
git clone https://github.com/xiaoshengyvlin/Zako-Prompt-Tools.git
then restart. Only dependency is requests; the tag database ships in the repo, so nothing to download. If thumbnails flake out where the board is reachable, the proxy route has a 24-hour image cache and retries on cold start - usually a refresh clears it.
Where people get burned: the whole UI is Chinese-labeled (the tag-mode dropdown especially), the pack is brand new (1.0.0 landed late August 2026) so community feedback is thin, and if you haven't searched and clicked anything the node outputs the blunt [请先搜索并点击选择一张图]. And keep in mind Danbooru is unrated at the edges - "inspiration search" has a way of surfacing content you weren't expecting. The 不含画师 default keeps the artist out of your prompt, but it won't keep the content out of your feed.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| tag格式 | COMBO | 不含画师 | 3 options: 全部, 不含画师, anima画师 |
| api_keyopt | STRING | — | |
| proxy_urlopt | STRING | — | |
| selected_tagsopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |