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

Image Save with Prompt (WLSH)

Image Save with Prompt (WLSH)

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

    This is the core of WLSH's save-node family: it writes your image to disk with A1111-style prompt metadata embedded in it - the way A1111 used to burn prompt, seed, and model info directly into the PNG so you could always tell what made an image just by inspecting the file. It's the node the pack's author built first, and the other IO nodes in the pack (the text-file variant, the info variant) are all extensions of this same idea.

    The context worth knowing: ComfyUI already embeds something into your PNGs by default - the entire workflow graph as JSON, which is genuinely clever and is why "drag the image back into ComfyUI and get the exact pipeline that made it" became a community norm. But that's not the same as human-readable prompt metadata you can glance at in an image viewer or a metadata reader built for A1111-style tags. This node adds that second, more legible layer on top - and, notably, it doesn't strip or interfere with ComfyUI's own workflow embedding while doing it. Your saved images stay "workflow included" and pick up the A1111-style comment/exif data as a bonus.

    Required inputs: images is your batch. filename (default %time_%seed) supports placeholder substitution: %time for a timestamp, %model for checkpoint name, %seed for the seed, %counter for an incrementing integer - each pulled from the matching optional input below when present. path sets the save subfolder (as a literal string - more on that in a second). extension picks png/jpeg/tiff/gif, and quality (1–100) controls jpeg compression.

    Optional inputs - these are what actually populate the embedded metadata: positive and negative (multiline strings), seed, modelname, counter, and time_format (the strftime-style pattern used to render %time, default %Y-%m-%d-%H%M%S). Leave them all empty and you still get a saved image with filename templating, just without any prompt data baked in - wire them up if the metadata is the point. This node has no output socket; it's a terminal write step.

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

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

    Restart ComfyUI. No models or extra dependencies to install.

    Two things worth knowing before you rely on this. First, the %time placeholder (and the others) only resolve inside the filename field - not path. This isn't a guess; the pack's author confirmed it directly when a user hit exactly this wall trying to auto-sort output into dated folders. If you want date-based subfolders, build that string yourself rather than expecting path to template it. Second, if you want the metadata and a separate text file with the same info for easy grepping across a folder, you want the sibling node Image Save with Prompt File (WLSH) instead - this plain version only writes the image.

    Common trip-up: a static filename with no %seed or %counter variation will silently overwrite earlier saves in the same batch or run. If you're generating more than one image per session, wire in a counter (a primitive set to "increment" is the standard pattern) or lean on %seed, which is different per generation by definition.

    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