Nodes/wlsh_nodes/Image Save with Prompt File (WLSH)
ComfyUI Node

Image Save with Prompt File (WLSH)

Image Save with Prompt File (WLSH)

By wallish77·Created 3 years ago·Updated 2 years ago· 144
Image Save with Prompt File (WLSH)
  • images
    filename%time_%seed
    path
    extension
    quality100
    positive
    negative
    seed0
    modelname
    counter0
    time_format%Y-%m-%d-%H%M%S

    If you've ever come back to a folder of generated images a week later with no idea what prompt made which one, this is the node built to stop that. It saves your image with metadata embedded the way Automatic1111 did it - and, unlike the plain version of this node, it also drops a matching .txt file next to the image with the same info, so you can grep a folder of outputs for a phrase without opening a single PNG.

    This whole family of save nodes comes from the pack author's own migration story: he'd been on A1111, moved to ComfyUI around the SDXL era, and missed A1111's habit of writing prompt/seed/model info straight into the file. ComfyUI's answer to reproducibility is different - it embeds the entire workflow JSON into the PNG, so dragging the image back in reconstructs your whole graph - but that's not the same as being able to read what prompt you used at a glance, or search across a folder. This node is the bridge: A1111-style human-readable metadata, on top of whatever ComfyUI is already doing.

    What you actually fill in. images is your generated batch. filename defaults to %time_%seed - the pack supports placeholder substitution here: %time for a timestamp (format controlled by the time_format field), %model for the checkpoint name, %seed for the seed value, and %counter for an incrementing integer, each pulled from the matching optional input if you wire one in. path is the subfolder to save into, extension picks the format (png/jpeg/tiff/gif), and quality controls lossy compression for jpeg (1–100, ignored for lossless formats). The optional inputs - positive, negative, seed, modelname, counter, time_format - are what actually gets baked into the metadata and the companion text file; leave them empty and you just get filename templating with no prompt record. There's no output socket - this is a terminal node, it just writes files.

    Installing it: through ComfyUI Manager, search "wlsh_nodes"; or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/wallish77/wlsh_nodes
    

    Restart ComfyUI. No model downloads, no extra dependencies beyond the pack itself.

    The one gotcha worth knowing before you build a whole naming scheme around this: the %time (and other) placeholders only get parsed inside the filename field - they do not work in the path field. This isn't a guess; the pack's own author confirmed it directly when someone hit exactly this wall trying to auto-organize outputs into dated folders: "Currently it does not parse the time keyword for the output directory." So path set to something like %time will not give you a folder-per-day structure - it'll just be treated as a literal string. If you want date-organized folders, you'll need to build that path yourself (a Time String node feeding a manually-assembled path string works, or just accept a flat folder and rely on the filename timestamp instead).

    Beyond that, the usual save-node footguns apply: an empty path saves relative to ComfyUI's default output directory, and if you're batching images with a static filename and no %counter or %seed variation, later images will silently overwrite earlier ones in the same run. Wire in a counter (typically from a primitive node set to "increment") if you're saving more than one image per session and want to keep all of them.

    CategoryWLSH Nodes/IO

    Inputs (11)

    NameTypeDefaultDescription
    imagesIMAGE
    filenameSTRING%time_%seed
    pathSTRING
    extensionCOMBO4 options: png, jpeg, tiff, gif
    qualityINT1001–100
    positiveoptSTRING
    negativeoptSTRING
    seedoptINT00–18446744073709550000
    modelnameoptSTRING
    counteroptINT00–18446744073709550000
    time_formatoptSTRING%Y-%m-%d-%H%M%S

    Outputs (0)

    No outputs