Nodes/ComfyUI Silver Nodes/Silver Flickr Random Image
ComfyUI Node

Silver Flickr Random Image

A Random Real Photo From Flickr, Filtered by Search, Style, and Date

By SilverAndJade·Created about a year ago·Updated 23 days ago· 0
Silver Flickr Random Image
    • image
    • image_url
    text
    min_upload_date2001-01-01
    max_upload_date2026-08-22
    orientationany
    stylesany
    safe_searchSafe
    per_page100
    seed0

    Want actual photographs in your img2img or style-transfer loop, not generated images? This node pulls a random photo from Flickr matching your search text, date range, orientation, and a style tag. The appeal is real-photo variety: set text to "street portrait", leave the rest broad, and every run drops a different real photo into your graph as a reference or a subject.

    How it works

    It calls Flickr's public REST API (flickr.photos.search), converting your min_upload_date/max_upload_date to unix timestamps, mapping safe_search to Flickr's 1/2/3 codes, and passing orientation and style filters. It requests several image sizes (from ~small up to original) so there's always a usable URL, jumps to a random page, shuffles the results, and skips any photo whose id it has already downloaded - that history lives in a history/flickr_history.txt file in the pack. Images over 2048px get resized down before they hit the graph.

    The API key situation - read this

    The README says "requires a valid Flickr API key," which makes it sound like setup work. It isn't. The key is hardcoded in the source code, so you don't supply anything. That's convenient, and it's also the node's biggest fragility: Flickr's API terms don't allow distributing keys, so this one could go dark whenever the author's key gets noticed and revoked. It works today; treat it as a toy that might stop working tomorrow, not as infrastructure.

    Inputs that matter

    • text - your search keywords. Empty string searches broadly, which is genuinely random.
    • min_upload_date / max_upload_date - YYYY-MM-DD bounds on when photos were uploaded. Defaults span 2001 to today.
    • orientation - any, landscape, portrait, square, or panorama.
    • styles - a multiselect of Flickr style tags like blackandwhite, bokeh, longexposure, macro. Keep in mind these are tag-based, so they're only as good as photographers' tagging.
    • safe_search - Safe, Moderate, or Restricted. Defaults to Safe; step it up only if Safe is too sterile for you.
    • per_page - how many candidates per request (capped at 100 internally).
    • seed - set above 0 to make the random draw reproducible.

    Outputs

    • image - the IMAGE tensor.
    • image_url - the source URL as a string.

    The gotcha that bites silently

    When Flickr flakes out - a 403, an exhausted search, rate limiting - the node returns a blank 64×64 black image and an empty URL instead of raising an error. If you've wired it into img2img you won't get a crash; you'll get a run that quietly produces garbage on a black square. Watch the console for [FlickrRandomImage] messages, and if your outputs suddenly turn black, that's the culprit. It needs working internet to flickr.com, full stop.

    Install

    ComfyUI Manager → search "ComfyUI Silver Nodes", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/SilverAndJade/comfyui-silver-nodes
    

    Restart after cloning. All it needs beyond ComfyUI's stock dependencies is requests, which you already have.

    Categoryimage/loading

    Inputs (8)

    NameTypeDefaultDescription
    textSTRING
    min_upload_dateSTRING2001-01-01
    max_upload_dateSTRING2026-08-22
    orientationCOMBOany5 options: any, landscape, portrait, square, panorama
    stylesCOMBOany16 options: any, blackandwhite, depthoffield, minimalism, pattern, minimal, +10
    safe_searchCOMBOSafe3 options: Safe, Moderate, Restricted
    per_pageINT1001–500
    seedINT00–4294967295

    Outputs (2)

    NameTypeDescription
    imageIMAGE
    image_urlSTRING