Nodes/ComfyUI-Aaalice-Nodes/🖼️ Booru Gallery
ComfyUI Node

🖼️ Booru Gallery

Browse Danbooru inside ComfyUI and get the post's tag prompt back with the image

By Aaalice233·Created 2 months ago·Updated 8 days ago· 25
🖼️ Booru Gallery
    • images
    • prompts

    Let's be honest about what anime workflows are really like: you alt-tab to Danbooru, copy tags, save a reference image, drag it into the graph, and repeat twenty times a session. Booru Gallery kills that whole loop. It searches Danbooru, Gelbooru, Safebooru or AI TAG from a panel inside ComfyUI, lets you click posts in a waterfall gallery, and then at queue time hands you each selected image and its source-post tag prompt - in the same order you picked them.

    That pairing is the point, not the download. Danbooru-trained models speak the tag vocabulary, and a correct tag beats a written sentence for pose, clothing and character identity. The node gives you a reference image and a ready-made prompt that were literally generated together, so they line up. It's the closest thing to a "use this exact thing I saw" button ComfyUI has.

    How it works

    The node has no classic inputs - the whole thing is the gallery widget in the frontend. Your selection lives in a hidden payload, and when the workflow executes the node fetches the chosen posts concurrently, decodes them, and emits. Two things worth knowing about that fetch:

    • It happens at execution time, not when you click. The images are downloaded when you run the workflow.
    • If any download or decode fails, the node fails loudly. No gray placeholder gets quietly slipped in, which matters when you're building a batch job on top of it.

    The outputs that matter

    • images - an IMAGE list, one per post, in selection order.
    • prompts - a STRING list of the matching tag prompts.

    Same length, same order, index-aligned. Wire images into a load/VaeEncode path and prompts into a CLIP text encode and you're generating from real source material. You can also drag reorder posts in the gallery and edit each post's local tags without touching the remote site.

    Setup and credentials

    Install via ComfyUI Manager (search ComfyUI-Aaalice-Nodes or the registry id comfyui-aaalice-nodes), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Aaalice233/ComfyUI-Aaalice-Nodes.git
    cd ComfyUI-Aaalice-Nodes
    pip install -r requirements.txt
    

    Then restart ComfyUI. The only dependency beyond ComfyUI itself is certifi, which adds extra public CA roots for HTTPS - that's it, no models to download.

    Danbooru, Safebooru and AI TAG work with no setup. Gelbooru needs its official User ID and API Key - you can paste the whole &api_key=…&user_id=… snippet from your account page into the API Key field. All credentials, the cache and your content blacklist live in Settings → Aaalice Nodes → Booru Gallery and are stored in your ComfyUI user directory, never in the workflow JSON.

    Gotchas

    • Don't install this pack alongside ComfyUI-Danbooru-Gallery - the author's older, standalone gallery. Both register the same node IDs (PromptSelector, GroupIsEnabled, SimpleNotify, …) and you'll get duplicate widgets and unpredictable behavior. Keep one.
    • If you hit SSL certificate errors: the plugin adds certifi's roots but never disables HTTPS verification. Check your system clock, any HTTPS proxy, and your trusted root certs before blaming the node.
    • It's a booru, so NSFW content is on the table. Use the rating filter, and the local content blacklist filters your view and the output - it's applied locally, not sent to the site as a blocked tag.
    • Site availability, credentials and favorites behavior (read/write on Danbooru, read-only on Gelbooru) belong to the third-party APIs. When Danbooru is slow, so are you.

    One more thing: this pack is a newer "V3 node" pack, so it wants a recent ComfyUI. It works on both the classic canvas and Nodes 2.0, but not App Mode. For what it does - turning "that post, right there" into a usable prompt - it's the node I'd reach for.

    CategoryAaalice/gallery

    Inputs (0)

    No inputs

    Outputs (2)

    NameTypeDescription
    imagesIMAGE
    promptsSTRING