Danbooru Get by URL
Grab any Danbooru post (image + tags) by URL, no API key needed
- IMAGE
- TAG
- POST_ID
- IMG_WIDTH
- IMG_HEIGHT
This is the boring node in the pack, and that's exactly why you'll reach for it. Paste a Danbooru post URL into Danbooru Get by URL and it hands you the actual image, the post's full tag list, the post ID, and the dimensions - as plain outputs you can wire into the rest of your graph. No search, no FAISS index, no model. It's the "give me this specific post" node, the friendly neighbor of the pack's much fancier semantic-search sibling.
The name is a small lie in the best way: it does not call any private API and needs no key. Danbooru's public JSON API is open for read-only post lookups, so you can pull from it with a blank username and password. The optional api_username / api_key fields just buy you higher rate limits - grab them from your Danbooru account settings if you're hammering the site.
How it works
Under the hood it's refreshingly simple: the node pulls the post ID out of the URL, fetches metadata through the Danbooru API, falls back to scraping the HTML page if the API call fails (that's the fetch_mode switch - auto, api, or html), downloads the actual file with retry logic, then returns it as a ComfyUI image tensor alongside the metadata.
Two things worth knowing before you trust it blindly:
zoomis a cap, not a target. Set it to 512 and a 3000px post gets downscaled so its longest side is 512. But a 400px post stays 400px - the node never upscales. If you expect every output to be exactly 512, you'll be surprised. The outputIMG_WIDTH/IMG_HEIGHTtell you what actually came back.- Failures return a gray placeholder image, not an error. Deleted post, dead link, wrong URL - you get a blank-ish image with the post ID baked in, and the graph keeps running. That's convenient, but it's also a trap: a placeholder can silently flow into a reference-image workflow and poison the result. Keep an eye on the console when
debugis on.
Inputs and outputs that matter
For a beginner there's really only one required input: the url (e.g. https://danbooru.donmai.us/posts/1234567). Then optionally the zoom cap. Everything else - credentials, fetch_mode, debug - is fiddling you can ignore until you hit a problem.
The outputs are where the value is:
- IMAGE - wire this into an IPAdapter or ControlNet as a reference, or use it as img2img input.
- TAG - the post's Danbooru tags as a comma-separated string. This is gold if you're prompting an anime model: Illustrious, NoobAI, and (partially) Pony were trained on the exact Danbooru tag vocabulary, so feeding a real post's tags into the prompt gets you dramatically closer to that look than free-form English.
- POST_ID - for provenance or a quick "same post" fetch later.
- IMG_WIDTH / IMG_HEIGHT - the dimensions after the zoom cap.
Install
This node ships in the Danbooru FAISS Search Nodes pack, so installing it installs all four nodes. Easiest path: ComfyUI Manager → search "Danbooru FAISS Search" → install. Or do it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/L33chKing/ComfyUI-danbooru-FAISS-search
cd ComfyUI-danbooru-FAISS-search
pip install -r requirements.txt
Then restart ComfyUI. The requirements list is on the heavy side for a "simple" node - faiss-cpu, onnxruntime, and dghs-imgutils (the wd14 tagger) pull in real dependency trees - but that's the whole pack paying for the search nodes you may not use. The index files download automatically on first run, so expect a wait the first time you execute any node here.
Gotchas
Danbooru hosts everything - the board's content rating runs from general to explicit, and this node does not filter. If you're running this in a shared or work-adjacent environment, be aware that a wrong URL can land explicit content in your preview window. And remember: this is the read-only companion, not the search engine. If you don't have a specific post URL yet, you want the pack's other nodes instead.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| url | STRING | Danbooru post URL (e.g. https://danbooru.donmai.us/posts/1234567) | |
| zoom | INT | 51264–8192 | — |
| api_usernameopt | STRING | — | |
| api_keyopt | STRING | — | |
| fetch_modeopt | COMBO | auto | How to fetch metadata: auto (API then HTML fallback), api only, or html only. |
| debugopt | BOOLEAN | false | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| TAG | STRING | — |
| POST_ID | STRING | — |
| IMG_WIDTH | INT | — |
| IMG_HEIGHT | INT | — |