Nodes/Mikey Nodes/Save Image With Prompt Data
ComfyUI Node

Save Image With Prompt Data

Save Image With Prompt Data (Mikey Nodes) — filenames that tell you what you actually typed

By bash-j·Created 3 years ago·Updated 10 months ago· 188
Save Image With Prompt Data
  • images
    positive_promptPositive Prompt
    negative_promptNegative Prompt
    filename_prefix
    parameters

    You know the feeling: you're scrolling through an output folder three weeks later trying to figure out which of forty near-identical ComfyUI_00234_.png files was the one with the prompt you liked. This node exists to stop that from happening again - it's Mikey Nodes' answer to "save the image and make the filename mean something."

    What it does, straight from the source

    The README is refreshingly direct about this one: it saves an image with the prompt data baked into the filename. The filename starts with a datestamp, then a chunk of your positive prompt gets appended after it - so a glance at your file browser tells you roughly what you asked for without opening a single image. On top of that, it writes the full positive and negative prompt text into the PNG's own metadata, the same way ComfyUI already embeds workflow JSON into its outputs - meaning you (or anyone you send the image to) can pull the exact prompt back out of the file itself, not just the truncated filename version.

    The inputs that matter

    • images - your VAE-decoded output, same as any save node.
    • positive_prompt / negative_prompt - plain text; wire these to the same strings you fed your CLIP Text Encode nodes so the metadata actually matches what you generated.
    • filename_prefix - an optional prefix on top of the datestamp-plus-prompt scheme; leave it blank and the node falls back to its own naming.
    • parameters - a free string slot for anything else you want stamped into the PNG info: sampler, steps, CFG, seed, whatever you'd normally have to remember or reconstruct by hand. This pairs neatly with Mikey Nodes' own Checkpoint Loader Simple Mikey, which outputs a checkpoint hash and name as strings you can concatenate straight into this field.

    It's an output-only node - no downstream wires, is_output_node is true - so it terminates the branch it sits on, same as the core Save Image node.

    Install

    Standard for this pack: ComfyUI Manager, search "Mikey Nodes," install, restart - or git clone https://github.com/bash-j/mikey_nodes into ComfyUI/custom_nodes and restart manually. Nothing to download beyond the pack itself; this node is pure string handling plus a PNG metadata write, no model weights involved.

    Common snags

    • Prompt text with special characters breaking the filename. Very long prompts, or prompts full of unusual punctuation, can produce filenames the OS chokes on (path length limits on Windows especially). If saves start silently failing on complex prompts, that's the first thing to check - trim the prompt or use the plainer Save Images Mikey node instead for that batch.
    • Metadata not showing up when you drag the PNG back into ComfyUI. ComfyUI's drag-and-drop workflow reconstruction reads the workflow metadata field, which is a separate thing from this node's prompt-text write. Don't confuse "I can read the prompt back out by inspecting the file" with "dragging it in reloads the exact graph" - this node gives you the former, not necessarily a full workflow reload.
    • Empty prompt fields. If you forget to wire positive_prompt/negative_prompt and leave the widget defaults ("Positive Prompt" / "Negative Prompt"), that literal placeholder text is what gets saved - an easy trap when you're mid-workflow-build and haven't connected everything yet.
    CategoryMikey/Image

    Inputs (5)

    NameTypeDefaultDescription
    imagesIMAGE
    positive_promptSTRINGPositive Prompt
    negative_promptSTRINGNegative Prompt
    filename_prefixSTRING
    parametersSTRING

    Outputs (0)

    No outputs