Nodes/ComfyUI-SaturnNodes/πŸͺ πŸ“· Visual Image Loader
ComfyUI Node

πŸͺ πŸ“· Visual Image Loader

Thumbnail your whole output folder, and get the old prompt back out of the PNG

By KOFibltoΒ·Created 2 months agoΒ·Updated 2 days agoΒ· 1
πŸͺ πŸ“· Visual Image Loader
    • IMAGE
    • positive_prompt
    • width
    • height
    β—„folderβ–Ί
    β—„display_modeScrollableβ–Ί
    β—„sort_images_byDate Modified (Newest First)β–Ί

    Core's LoadImage shows you the last thing you uploaded, which is fine for one image and useless when what you actually want is to browse the nine hundred renders in your output folder and find the one where the lighting worked. This node puts a scrollable thumbnail grid on the canvas. You click an image, you get the tensor - plus, and this is the interesting part, the prompt that made it, pulled back out of the file's metadata as a string.

    So the loop becomes: scroll your back catalogue, find a keeper, and remix it with the original prompt already in the graph instead of squinting at a settings panel.

    How the prompt extraction works

    Three fallbacks, in order:

    1. ComfyUI's own metadata. A saved PNG carries the generation graph in its text chunks. The node walks that graph looking for the text input feeding a positive conditioning and returns it. This is a heuristic trace, not a lookup - on a normal checkpoint-plus-text-encode graph it nails it, on a graph where the prompt was assembled by string nodes, or came from an API-format file with only node ids and values, it can come back empty or grab the wrong string.
    2. A1111 parameter blocks. If there's a flat parameters chunk, it takes everything up to the Negative prompt: / Steps: line - the old WebUI format.
    3. EXIF UserComment. The same flat parsing, from the EXIF tag where A1111-style tools put a parameter string on JPEG and WebP.

    Results are cached to a JSON file in the pack's user directory for the most recent 128 images, so re-opening the folder doesn't re-parse everything from scratch.

    The blunt consequence: if your file has no metadata, you get an empty string. Anything that re-encoded the image - a screenshot, a JPEG conversion, most image hosts - stripped the generation data on the way through. Then there's nothing to extract, and the node is a plain image browser.

    Alongside the prompt, it reports width and height as real integers, falling back to the actual pixel size if metadata doesn't have it - which is how you re-render a found image at its original resolution.

    Inputs and outputs

    folder (browse path), then two advanced widgets: display_mode (Scrollable or Show All - show-all is for small folders, scrollable for the ones with nine hundred files) and sort_images_by (name A-Z / Z-A, date modified newest / oldest; newest-first is the default because that's what you usually want).

    Outputs are IMAGE, positive_prompt (STRING), width (INT) and height (INT). The prompt string goes into a text encode, the dimensions into your latent node if you're redoing the same frame. There's also a thumbnail-size control in the node's own UI whose value is saved with the workflow, so a node set up for a small folder and one for a huge folder don't have to look the same.

    Install

    ComfyUI Manager β†’ search SaturnNodes, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/KOFiblto/ComfyUI-SaturnNodes
    

    Restart. requirements.txt is Pillow, numpy and piexif - piexif exists precisely for the EXIF path above, and it installs with the pack. Category: πŸͺ SaturnNodes/Loaders, with an ImageLoaderVisualPrettyV2 alias for older graphs.

    Where people get burned

    Nothing appears in the grid. The folder is confined to ComfyUI's input, output and temp directories on purpose, and paths outside that - or traversal with .. - won't be served. Point it at a subfolder inside output/ instead of at your D: drive.

    The prompt comes back blank. Almost always a stripped file. Check whether the original PNG still exists somewhere; if it's been through a re-encode, the data is gone and no node can recover it.

    The extracted prompt is the wrong one. The graph trace is a heuristic. Workflows that build prompts dynamically, or that have several text nodes, can confuse it. Treat the string as a strong suggestion and read it before you queue a thousand images with it.

    The first open is slow. It parses metadata for a batch of the newest images and writes a cache file; after that it's quick. A folder on a network share makes the thumbnail pass feel worse.

    Prompt unloads at random. With a paused or cancelled run, ComfyUI clears its cache; re-selecting the tile re-reads the file from disk, which is cheap. It's not corruption, just the cache doing its job.

    CategoryπŸͺ SaturnNodes/Loaders

    Inputs (3)

    NameTypeDefaultDescription
    folderSTRINGβ€”
    display_modeCOMBOScrollable2 options: Scrollable, Show All
    sort_images_byCOMBODate Modified (Newest First)4 options: Name (A-Z), Name (Z-A), Date Modified (Newest First), Date Modified (Oldest First)

    Outputs (4)

    NameTypeDescription
    IMAGEIMAGEβ€”
    positive_promptSTRINGβ€”
    widthINTβ€”
    heightINTβ€”