Nodes/ComfyUI_FMJ_SaveImageVersions/💾 Save Image + Snapshot (FMJ)
ComfyUI Node

💾 Save Image + Snapshot (FMJ)

Save the image, the prompts, and the exact build that baked it

By bulldog68·Created 8 months ago·Updated 8 months ago· 1
💾 Save Image + Snapshot (FMJ)
  • images
    positive
    negative
    filename_prefixfmj
    save_snapshottrue

    ComfyUI's built-in Save Image already buries your whole workflow in the PNG - drag any output back in and the graph reassembles. What it doesn't give you is the environment: the exact commits of ComfyUI and every custom node that were running the day you made that image. That's the gap this node is built around. It saves your image, stamps the positive and negative prompts in as plain-text metadata, and drops a snapshot.txt file next to it listing the Python, PyTorch, CUDA, GPU, and every git commit involved. Two weeks later, when something in your graph silently broke after an update, that sidecar tells you exactly what changed - and its sibling load node hands you the command to pin it all back.

    Honest framing first: if you just want to share a workflow, the stock Save Image node does the job and everyone can read it. This earns its place when you've been burned by "worked yesterday" and want reproducible builds, or when you're iterating on custom node versions and need to know which state produced which result. It's a narrow niche, but it's a real one - reproducibility is a recurring complaint in the ComfyUI ecosystem, and most "solutions" stop at saving the graph JSON.

    How it works

    The node writes each image to your ComfyUI output directory as {prefix}_{timestamp}_00.png (counter increments for batches, timestamps mean it never silently overwrites an old file). Embedded in the PNG are text chunks for positive and negative, plus whatever extra_pnginfo ComfyUI passes in hidden - which includes the workflow, so you still get drag-back-into-the-graph behavior.

    If save_snapshot is on, it runs the pack's snapshot.py script. That script walks up from the custom node folder to find your ComfyUI root, reads Python/PyTorch/CUDA/GPU info, and for ComfyUI core and every folder in custom_nodes records the current git commit and remote URL, writing it all to comfyui_snapshot.txt. The node then copies that file beside your PNG as {prefix}_{timestamp}_00.snapshot.txt. That's the whole trick - a per-image environment fingerprint.

    The inputs that matter

    Only four, and only two you'll actually touch:

    • images - the IMAGE tensor from your VAE decode, or whatever you're saving.
    • filename_prefix (default fmj) - gets sanitized down to safe characters, so don't worry about slashes or spaces; just pick something meaningful.
    • positive / negative - your prompts. Stored as plain-text PNG chunks, so tools that read A1111-style metadata can see them too.
    • save_snapshot (default true) - the environment fingerprint. The one you'll flip off when you're just doodling and don't want a subprocess firing per save.

    It's an output node, so it has no outputs. Put it at the end of the graph.

    Install

    The README gives two routes, both trivial - there are no model downloads and no extra Python packages beyond what ComfyUI already ships (Pillow, numpy, torch):

    cd /path/to/ComfyUI/custom_nodes
    git clone https://github.com/bulldog68/ComfyUI_FMJ_SaveImageVersions
    

    Then restart ComfyUI. Or use ComfyUI Manager's "Install from Git repository" with https://github.com/bulldog68/ComfyUI_FMJ_SaveImageVersions and restart. The nodes appear under the 🌀FMJ category.

    Gotchas

    • It's brand new and barely known. As of writing this has essentially zero community footprint - one commit, no threads about it. Expect rough edges and don't assume anyone's tested it at scale.
    • save_snapshot spawns a subprocess on every save, which is a few hundred extra milliseconds per image and a little more on big batches. Keep it on for the images you care about, off for bulk dumps.
    • The README's own security warning is worth taking literally: the node executes a local script, so only run it in environments you trust, keep write access to custom_nodes and output restricted, and don't put secrets in prompts or metadata. The pack did a real security pass (no shell injection, path-traversal checks), which is more than most one-person packs bother with - but the principle still holds.
    • Console output is in French with emoji. Harmless, just don't be confused by "✅ Snapshot copié".
    Category🌀FMJ

    Inputs (5)

    NameTypeDefaultDescription
    imagesIMAGE
    positiveSTRING
    negativeSTRING
    filename_prefixSTRINGfmj
    save_snapshotBOOLEANtrue

    Outputs (0)

    No outputs