Nodes/ComfyUI_FMJ_SaveImageVersions/🔍 Load Image + Snapshot (FMJ)
ComfyUI Node

🔍 Load Image + Snapshot (FMJ)

Pull the recipe back out of an FMJ PNG — prompts and the restore command included

By bulldog68·Created 8 months ago·Updated 8 months ago· 1
🔍 Load Image + Snapshot (FMJ)
    • image
    • positive
    • negative
    • config_info
    • restore_command
    image

    The read side of the FMJ save-and-restore pair. Where the save node bakes your prompts and an environment snapshot into a PNG, this node reverses the process: pick a .png from your input folder and it hands you the image, the positive and negative prompts as plain strings, the snapshot contents, and a ready-to-copy command that pins your whole ComfyUI install back to the exact commits that produced that image. If you've ever squinted at a PNG's raw metadata in a hex editor trying to remember what you generated, this is the friendlier version of that.

    The use case is reproducibility with a side of archaeology. ComfyUI already embeds workflows in images as standard, but the environment that ran the workflow is normally invisible - which is why so many "worked on my machine" stories end with a version conflict or a broken node pack. This node's whole job is to make that invisible state readable again. You don't need it every day. You're very glad it's there on the day a custom node update breaks your favorite workflow and you need to know which commits you were on.

    How it works

    Under the hood it's simple: the node lists .png files in your ComfyUI input directory (with upload support), opens the one you pick, and reads its PNG text chunks. positive and negative come straight out of the metadata. For the snapshot, it looks for a sidecar file named {filename}.snapshot.txt - first in your output directory, then in input - and reads it into config_info. That sidecar only exists if the image was saved with the companion save node and save_snapshot was on, so don't expect it on arbitrary PNGs.

    From the snapshot it builds restore_command: a commented hint plus the actual command, Windows or Linux/Mac variant depending on your OS, pointing at the pack's restore_snapshot.bat/.sh. If there's no sidecar, you get a friendly "generate with the Save node first" placeholder instead.

    The outputs

    • image (IMAGE) - the loaded image, ready to wire into a preview or back into a graph.
    • positive / negative (STRING) - the prompts, or empty strings if the PNG has none.
    • config_info (STRING) - the full snapshot text: Python, PyTorch, CUDA, GPU, and every commit/remote in your environment.
    • restore_command (STRING) - the copy-paste restore line.

    Wire the strings into a Text display node (or just read them in the node output area) and you've got everything.

    Install

    Same pack, same one-liner:

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

    Restart, and you'll find it under 🌀FMJ. No models, no extra dependencies beyond what ComfyUI already has. ComfyUI Manager's "Install from Git" with https://github.com/bulldog68/ComfyUI_FMJ_SaveImageVersions works too.

    Gotchas

    • Restoring is not a one-click button. The restore_command is a command you paste into a terminal in your ComfyUI root, after quitting ComfyUI. It's also interactive - it asks which commits to apply and only reinstalls dependencies for the nodes it actually changed. That's a feature (you can skip a risky pin), but it means the restore flow needs a human at the keyboard.
    • The restore script needs your git history. It checks out recorded commits, so if a repo has since been re-cloned or history-rewritten, that commit won't exist and the checkout will silently fail. Snapshots are a point-in-time record, not a time machine.
    • It only works on FMJ-saved PNGs for the full payload. Drop in any other image and you'll get the image back with empty prompts and a "snapshot not found" note - no crash, just less magic.
    • The pack is very new and effectively untested in the wild (one commit at the time of writing), so treat it as a handy tool, not infrastructure. And per the README's own advice: don't put secrets in metadata, and only run this in environments you trust.
    Category🌀FMJ

    Inputs (1)

    NameTypeDefaultDescription
    imageCOMBO1 options: example.png

    Outputs (5)

    NameTypeDescription
    imageIMAGE
    positiveSTRING
    negativeSTRING
    config_infoSTRING
    restore_commandSTRING