Nodes/WDanbooru Injector/🌸 W-Booru Grabber
ComfyUI Node

🌸 W-Booru Grabber

Turn an artist's whole booru gallery into a prompt dataset

By Winnougan·Created 4 months ago·Updated 4 months ago· 1
🌸 W-Booru Grabber
    • output_path
    • status
    • post_count
    artist_url
    output_filenameartist_dataset
    quality_prefixmasterpiece, best quality, score_7
    include_ratingtrue
    max_general_tags60
    max_posts0
    separatorblank line
    request_delay0.6
    gelbooru_user_id
    gelbooru_api_key
    e621_username
    e621_api_key
    danbooru_username
    danbooru_api_key

    W-Booru Grabber is the least glamorous node in the WDanbooru pack, and it's the one that will actually save you an afternoon. If you've ever assembled a LoRA training set for an anime artist - or just wanted a library of how they tag their work - you know the ritual: open the artist's gallery, page through every post, copy the tags, paste them into a text file, repeat. This node does all of it in one go.

    Paste an artist's page URL in, and it walks the entire gallery via that site's API and writes one prompt per post into a .txt file in your ComfyUI output folder. The result reads like a ready-made caption file: masterpiece, best quality, score_7, safe, 1girl, long hair, @artistname, .... That's usable as a training dataset for a LoRA, or just as a prompt library you can dip into later.

    How it works

    The node parses the artist URL you paste into a site name and an artist tag, then pages through that booru's JSON API with a pause between requests so you don't get throttled. It supports the whole family - e621, Danbooru, Gelbooru, Konachan, Yande.re, Safebooru, Rule34.xxx, Lolibooru, Hypnohub, ATFBooru, Xbooru - and it builds each line the same way Anima and the Danbooru-trained models like their prompts: quality prefix, then the rating (if you want it), then character, copyright, and general tags. Underscores become spaces, which is exactly what Anima expects.

    It's flagged as an output node, so don't expect a preview image - the results land on disk, and the status output is where it tells you what happened.

    The inputs that matter

    • artist_url - the full artist page URL, e.g. https://e621.net/posts?tags=whisperfoot. That's the whole point of the node: paste the browser URL, done.
    • max_posts - how many posts to fetch. 0 means everything, which for a prolific artist is a lot of requests. Start at 100 for a test run.
    • request_delay - seconds between API pages (default 0.6). If you get rate-limited, bump it to 1.0+.
    • output_filename - name of the .txt it writes (no extension needed). It lands in ComfyUI/output/.

    include_rating adds safe / questionable / explicit to each line (on by default - handy for dataset hygiene). max_general_tags caps how many descriptive tags per post make it in. separator lets you pick blank lines, ---, ===, or single-line output.

    Outputs

    Three of them: output_path (full path to the file), status (a summary string - and where error messages show up), and post_count (how many prompts were written). Wire them to a text display node if you want them on screen.

    Installing it

    Same as the rest of the pack - ComfyUI Manager, search WDanbooru_Injector, install and restart. Or the manual way:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Winnougan/WDanbooru_Injector.git
    

    Restart ComfyUI and the three nodes appear under the WDanbooru category. The only dependency is requests, which ComfyUI already ships, so there's nothing extra to download - no model files, no heavy deps.

    Common gotchas

    Gelbooru refuses every request without a free-account API key, so fill in gelbooru_user_id and gelbooru_api_key if that's your source. e621 requires a username in its requests (their API policy), or you'll get 403s - the e621_username field exists exactly for that. And when the status output reads like an error, read it: the node is honest about what failed, from credential problems to "no posts found."

    One genuinely useful habit: run max_posts = 100 first. It takes seconds, confirms the URL parses and the creds work, and keeps you from firing ten thousand requests at a site before discovering a typo.

    CategoryWDanbooru

    Inputs (14)

    NameTypeDefaultDescription
    artist_urlSTRINGPaste the full artist page URL from any supported booru: e621, Danbooru, Gelbooru, Konachan, Yande.re, Safebooru, Rule34.xxx, Lolibooru, Hypnohub, ATFBooru, Xbooru. e.g. https://e621.net/posts?tags=whisperfoot
    output_filenameSTRINGartist_datasetName for the output .txt file (no extension needed).
    quality_prefixSTRINGmasterpiece, best quality, score_7
    include_ratingBOOLEANtrueInclude the post's safety rating (safe/questionable/explicit) in each prompt.
    max_general_tagsINT601–300Max number of general/descriptive tags per post.
    max_postsINT00–10000Max posts to fetch. 0 = fetch all (may be slow for prolific artists).
    separatorCOMBOblank lineHow to separate prompts in the output file.
    request_delayFLOAT0.60.1–5Seconds to wait between API pages. Increase if you get rate-limited.
    gelbooru_user_idoptSTRING
    gelbooru_api_keyoptSTRING
    e621_usernameoptSTRINGYour e621 username. Optional for public posts.
    e621_api_keyoptSTRINGYour e621 API key. Optional, increases rate limits.
    danbooru_usernameoptSTRINGYour Danbooru username. Optional for public posts.
    danbooru_api_keyoptSTRINGYour Danbooru API key. Optional, increases rate limits.

    Outputs (3)

    NameTypeDescription
    output_pathSTRING
    statusSTRING
    post_countINT