Nodes/ComfyUI-ScenePromptViewer/Scene Prompt Viewer
ComfyUI Node

Scene Prompt Viewer

Your whole image folder on one node — with a prompt card for every image

By yixuanzona·Created 4 months ago·Updated 2 months ago· 10
Scene Prompt Viewer
    • IMAGE
    • prompts
    • filenames
    • image_1
    • prompt_1
    • image_2
    • prompt_2
    • image_3
    • prompt_3
    • image_4
    • prompt_4
    • image_5
    • prompt_5
    • image_6
    • prompt_6
    • image_7
    • prompt_7
    • image_8
    • prompt_8
    image_folder
    sort_byfilename_asc
    slot_count1
    _internal_state{}
    prompt_in_1
    prompt_in_2
    prompt_in_3
    prompt_in_4
    prompt_in_5
    prompt_in_6
    prompt_in_7
    prompt_in_8

    Every ComfyUI user hits the same wall eventually: you've got a folder of 40 images that all need the same pass - upscale, face fix, style transfer - and the standard answer is a batch of Load Image nodes, or one big batch where you can't tell which image is which. Scene Prompt Viewer is the node that says "no." Point it at a folder and it renders a card per image, each with its own editable prompt field, right there on the node. You can see everything at once, tweak prompts per picture, and still get the whole set out as one IMAGE batch for your downstream nodes.

    The author built it for exactly that workflow - they said so in their r/comfyui Show-and-Tell post. Switching back and forth between images and their prompts, then manually renaming and sorting files during batch processing, was eating their time. The whole pack is that pain, packaged. It's niche, but if you've ever hand-numbered 60 output files, you get it immediately.

    How it works

    The clever part is the UI. The node ships a JS extension that scans your folder via a local route (/scene_prompt_viewer/scan) on ComfyUI's own server - no external API, no key, no model downloads. Click ↻ Rescan and you get thumbnail cards; type a prompt into any card. Those prompts are serialized into a hidden _internal_state widget as JSON, so they survive saving the workflow and reopening it.

    When you hit Queue, the node re-scans the folder fresh (in case you dropped new files in), loads every image, and letterboxes them all to the dimensions of the first image - mismatched aspect ratios get black bars, which is worth knowing if your folder is a mix of portraits and landscapes. Prompts are matched to images by lowercase filename, so renaming a file detaches its prompt.

    Inputs and outputs that matter

    Only three settings do anything on a normal run:

    • image_folder - the path to scan. Top-level files only; no subfolders.
    • sort_by - filename_asc or filename_desc. Changes card order and, importantly, the order of the batch.
    • slot_count - how many individual image/prompt socket pairs you want (0–8). Images beyond that are batch-only.

    You'll also see prompt_in_1 through prompt_in_8 (optional string inputs) and a hidden _internal_state widget - leave that alone.

    Outputs: IMAGE (the full batch), prompts (all prompts newline-joined), filenames (comma-joined file stems, no extension - this is what feeds the pack's saver), plus image_N / prompt_N pairs up to 8. The external prompt_in_N override wins over the card textarea if both exist.

    Install

    Via ComfyUI Manager: search ScenePromptViewer in the Node Pack tab. Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/yixuanzona/ComfyUI-ScenePromptViewer.git
    

    Restart ComfyUI. It's under image → utils. There's no requirements.txt worth worrying about - the pack uses only Pillow, torch, numpy, and aiohttp, all of which ship with ComfyUI. Zero model downloads.

    Gotchas

    Keep batches around 20 images for smooth performance; heavier downstream nodes (upscalers especially) will eat VRAM fast, so don't cram 100 images into one queue. Hidden scenes (the ✕ button) get black placeholder images in the individual slots. And since prompt_in_N inputs are force-input, you need a text source to drive them - that's what the pack's Scene Prompt Text node is for.

    Categoryimage/utils

    Inputs (12)

    NameTypeDefaultDescription
    image_folderSTRING
    sort_byCOMBOfilename_asc2 options: filename_asc, filename_desc
    slot_countINT10–8
    _internal_stateSTRING{}
    prompt_in_1optSTRING
    prompt_in_2optSTRING
    prompt_in_3optSTRING
    prompt_in_4optSTRING
    prompt_in_5optSTRING
    prompt_in_6optSTRING
    prompt_in_7optSTRING
    prompt_in_8optSTRING

    Outputs (19)

    NameTypeDescription
    IMAGEIMAGE
    promptsSTRING
    filenamesSTRING
    image_1IMAGE
    prompt_1STRING
    image_2IMAGE
    prompt_2STRING
    image_3IMAGE
    prompt_3STRING
    image_4IMAGE
    prompt_4STRING
    image_5IMAGE
    prompt_5STRING
    image_6IMAGE
    prompt_6STRING
    image_7IMAGE
    prompt_7STRING
    image_8IMAGE
    prompt_8STRING