Nodes/Comfyui-Gelbooru/Gelbooru (Random)
ComfyUI Node

Gelbooru (Random)

A ComfyUI node in Gelbooru with 22 inputs and 8 outputs.

By 1mckw·Created 2 years ago·Updated about a month ago· 11
Gelbooru (Random)
    • imgtags
    • imgurl
    • imgid
    • width
    • height
    • source
    • url
    • IMAGE
    use_custom_promptfalse
    site
    OR_tags
    AND_tags
    exclude_taganimated,
    remove_tagscensored, mosaic_censoring, bar_censor
    add_good_tagstrue
    remove_bad_tagstrue
    convert_underscorefalse
    change_backgroundDon't Change
    change_colorDon't Change
    Safetrue
    Questionabletrue
    Explicittrue
    score0
    api_credentials
    seed0
    count1
    use_last_promptDisabled
    return_picturefalse
    extra_text
    custom_prompt
    CategoryGelbooru

    Inputs (22)

    NameTypeDefaultDescription
    use_custom_promptBOOLEANfalseEnable custom prompt override - replaces imgtags entirely with custom_prompt input
    siteCOMBOImage board to search: Gelbooru or Rule34
    OR_tagsSTRINGAt least one of these tags must be present (broadens results). Example: blonde, red_hair finds images with EITHER blonde OR red_hair. Use when you want variants (hair colors, poses, outfits) in one search
    AND_tagsSTRINGAll of these tags must be present on the image (narrows results). Example: 1girl, smile finds images with BOTH 1girl AND smile
    exclude_tagSTRINGanimated,Tags to exclude from results (comma-separated)
    remove_tagsSTRINGcensored, mosaic_censoring, bar_censorTags to remove from the output imgtags (comma-separated). Useful for filtering out unwanted tags from the result
    add_good_tagsBOOLEANtruePrepend quality tags (masterpiece, best quality, etc.) from good_tags.txt
    remove_bad_tagsBOOLEANtrueRemove known bad tags (watermark, text, censored, etc.) loaded from bad_tags.txt
    convert_underscoreBOOLEANfalseConvert underscores to spaces in tags
    change_backgroundCOMBODon't ChangeAdd or remove background-related tags from the result
    change_colorCOMBODon't ChangeAdd or remove color-related tags from the result
    SafeBOOLEANtrueInclude Safe/General rated posts
    QuestionableBOOLEANtrueInclude Questionable/Sensitive rated posts
    ExplicitBOOLEANtrueInclude Explicit rated posts
    scoreINT00–18446744073709550000Minimum score threshold (0 = no filter)
    api_credentialsSTRINGAPI credentials in format: api_key=YOUR_KEY&user_id=YOUR_ID
    seedINT00–18446744073709550000
    countINT11–100Number of posts to fetch per request (max 100)
    use_last_promptCOMBODisabledDisabled: fetch new results. Last Prompt: reuse previous API response. Previous Prompt: reuse the response before last.
    return_pictureBOOLEANfalseDownload the first post's image and output as IMAGE tensor
    extra_textoptSTRINGGenerated text from another node, prepended before the final output (connect only, not editable)
    custom_promptoptSTRINGCompletely replaces imgtags output when use_custom_prompt is enabled (connect only)

    Outputs (8)

    NameTypeDescription
    imgtagsSTRINGAll tags of the fetched post(s), comma-separated
    imgurlSTRINGDirect file URL(s) of the image(s)
    imgidSTRINGPost ID(s) on the image board
    widthINTWidth of the image(s) in pixels
    heightINTHeight of the image(s) in pixels
    sourceSTRINGSource website URL(s) of the post(s)
    urlSTRINGThe full API query URL used for the request
    IMAGEIMAGEImage tensor (only populated when return_picture is enabled)