Nodes/ComfyUI_e621_booru_toolkit/[OLD] Fetch e621/Booru Post
ComfyUI Node

[OLD] Fetch e621/Booru Post

The node the pack wants you to replace

By DraconicDragon·Created 2 years ago·Updated 3 months ago· 7
[OLD] Fetch e621/Booru Post
    • IMAGE
    • GENERAL_TAGS
    • CHARACTER_TAGS
    • COPYRIGHT_TAGS
    • ARTIST_TAGS
    • E6_SPECIES_TAGS
    • SCALED_WIDTH
    • SCALED_HEIGHT
    • ORIGINAL_WIDTH
    • ORIGINAL_HEIGHT
    url
    scale_target_avg1024
    img_sizesample
    format_tagstrue
    exclude_tagstrue
    user_excluded_tagsconditional dnp, sound_warning, unknown_artist, third-party_edit, anonymous_artist, e621, e621 post recursion, e621_comment, patreon, patreon logo, patreon username, instagram username, text, dialogue

    This is the original fetch node - the one that started this pack - and it's now explicitly marked DEPRECATED. The README says it plainly: old workflows will keep working, but it may be removed in the future, and the new "Get Booru Post (Any Service) Adv." is meant to behave the same way with one or two obvious changes. So if you've seen this node in a saved workflow or an older tutorial, here's the short version: it still runs, but don't build anything new on it.

    The pack is a rewrite of yffyhk/comfyui_auto_danbooru, and GetBooruPost is the pre-rewrite artifact - a single node that fetched both Danbooru and e621 posts and returned the image, categorized tags, and dimensions. Its one genuinely nice feature that the new nodes dropped is the scale_target_avg input: it computes diffusion-friendly dimensions whose average lands near your target (1024 for SDXL) while keeping width and height as multiples of 64, and outputs them as SCALED_WIDTH and SCALED_HEIGHT. That auto-sizing is why some people cling to it. If you switch, replicate it with an image-scale or resolution-picker node and you lose nothing else.

    How it works

    It appends .json to the post URL, then branches on the URL's contents: anything containing e621, e926, or e6ai is parsed as e621 JSON, and everything else falls back to the Danbooru parser. Note the honest limits: no Gelbooru support at all, and the detection is keyword-based rather than proper domain matching - which is exactly what the rewrite fixed.

    Inputs and outputs

    • url - the post URL.
    • scale_target_avg (default 1024) - targets the average of the scaled dimensions; outputs stay multiples of 64.
    • img_size - sample default, original for full-res, none - don't download image for tags only.
    • format_tags and exclude_tags - the same prompt-formatting and housekeeping-tag blocklist the new nodes carry (minus the trailing_comma option).

    Outputs: IMAGE, GENERAL_TAGS, CHARACTER_TAGS, COPYRIGHT_TAGS, ARTIST_TAGS, E6_SPECIES_TAGS (empty for Danbooru posts), SCALED_WIDTH, SCALED_HEIGHT, ORIGINAL_WIDTH, ORIGINAL_HEIGHT.

    Install

    Same pack, same install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/DraconicDragon/ComfyUI_e621_booru_toolkit
    

    restart, done. Dependencies are requests, pillow, and curl_cffi.

    Should you use it?

    If a workflow you inherited uses it and works, leave it alone. But the deprecation notice isn't idle - the rewrite split this into per-service nodes (Get e621/e6ai Post, Get Danbooru Post) plus the Any Service node precisely because the keyword-guessing fallback breaks on sites the author didn't anticipate. New work should use "Get Booru Post (Any Service)". Keep the scaled-dimension trick in your back pocket though - it was genuinely handy, and nothing in the new nodes quite replaces it out of the box.

    CategoryE621 Booru Toolkit

    Inputs (6)

    NameTypeDefaultDescription
    urlSTRINGEnter the URL of the Danbooru/e621 post
    scale_target_avgINT102464–16384[BETA] Calculates the image's width and height so it's average is close to the scale_target_avg value while keeping the aspect ratio as close to original as possible. Use 1024 for SDXL
    img_sizeCOMBOsampleSelect the image size variant to output through 'IMAGE'. Choose 'none' to output a blank image. For e6, anything below sample will be 'preview'
    format_tagsBOOLEANtrueRemoves underscores and adds backslashes to brackets if set to True
    exclude_tagsBOOLEANtrueRemoves tags before output based on textbox content below
    user_excluded_tagsSTRINGconditional dnp, sound_warning, unknown_artist, third-party_edit, anonymous_artist, e621, e621 post recursion, e621_comment, patreon, patreon logo, patreon username, instagram username, text, dialogueEnter tags you don't want outputted. Input should be comma separated like prompts (they can include underscore or spaces, with or without backslashes)

    Outputs (10)

    NameTypeDescription
    IMAGEIMAGE
    GENERAL_TAGSSTRING
    CHARACTER_TAGSSTRING
    COPYRIGHT_TAGSSTRING
    ARTIST_TAGSSTRING
    E6_SPECIES_TAGSSTRING
    SCALED_WIDTHINT
    SCALED_HEIGHTINT
    ORIGINAL_WIDTHINT
    ORIGINAL_HEIGHTINT