Nodes/Lyonir Studio/๐Ÿบ Lyonir Save Image
ComfyUI Node

๐Ÿบ Lyonir Save Image

The Filmstrip Inside the Node

By LyonirยทCreated 24 days agoยทUpdated 8 days agoยท 3
๐Ÿบ Lyonir Save Image
  • image
  • image
โ—„filename_prefixLyonirโ–บ
โ—„subfolderLyonirโ–บ
โ—„history_limit18โ–บ

Core SaveImage already saves your image, embeds the workflow in the PNG, and dumps it in output/. What it doesn't do is let you look at what you just made without leaving the canvas or opening a file browser. ๐Ÿบ Lyonir Save Image keeps a thumbnail strip inside the node, so the last couple of dozen things you saved are one click away and stay there after you restart ComfyUI.

What it actually is

A subclass of ComfyUI's own SaveImage, plus a gallery. That inheritance matters more than it sounds: because it calls the parent's save path, everything about the normal save is preserved - the filename_prefix โ†’ subfolder โ†’ ComfyUI/output layout, and the PNG text chunks that carry both the workflow and prompt JSON. Meaning: drag the output back onto the canvas and the graph reconstructs, same as always. If you're relying on that trick to recover a seed you lost, this node doesn't break it.

What it adds is bookkeeping. After the save, the node appends each written file to a per-node manifest - a small JSON file living in a hidden .lyonir_gallery folder inside your output directory, named after the node's ID - and hands the frontend both the current batch and the recent history under its own UI keys. The node's web script renders that as a clickable thumbnail row. There's also a small HTTP route so the frontend can re-request the list.

One detail worth appreciating: when reading history back, the node re-checks that each file still exists on disk and quietly drops entries whose file is gone. Move or delete a render outside ComfyUI and the stale thumbnail disappears instead of giving you a broken image icon. And if the gallery step ever fails, the code catches it, prints a warning, and returns the saved image anyway - a bookkeeping bug can't cost you a render.

Inputs and outputs

Four required inputs, all straightforward:

  • image - "Image or image batch to save."
  • filename_prefix - defaults to Lyonir; the actual filename ComfyUI generates is this prefix plus a counter.
  • subfolder - defaults to Lyonir, so your files land in ComfyUI/output/Lyonir/ rather than loose in the output root. Keep it if you like tidy folders.
  • history_limit - how many recent thumbnails the node shows, 4 to 100, default 18. It's a display setting, not a retention setting: ComfyUI never deletes the files.

The single output is image, typed IMAGE, and it's a straight passthrough of the input. So you can chain a save point into the middle of a graph and keep going - feed a preview, a second save with a different prefix, or a Save Video node downstream. The node is also an output node, so it runs even as a dead end.

Install

Manager, search ComfyUI-Lyonir-Studio, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Lyonir/ComfyUI-Lyonir-Studio.git
python -m pip install -r ComfyUI-Lyonir-Studio/requirements.txt

Windows portable: run that requirements line with .\python_embeded\python.exe. Restart, then hard-refresh the browser - the thumbnail strip is frontend JavaScript shipped by the pack, and a stale cached tab is the usual "I installed it and nothing changed" story. No models, no FFmpeg needed for this node.

Where people trip

Duplicating the node doesn't duplicate the history. The gallery is keyed to the node's ID, deliberately - the same design in Lyonir Save Video so that a newly pasted node starts empty instead of inheriting someone else's filmstrip. Add a fresh node and you get a fresh strip.

Thumbnails vanish when the files do. They're an index over output/, not a copy. Delete the folder, lose the strip.

Don't clear out .lyonir_gallery. It's hidden and it looks like junk. It's the index. Losing it isn't fatal - new saves start a new manifest - but the old strip is gone.

Different prefix, different clutter. Set filename_prefix to something meaningful and give different save nodes different prefixes, or you'll be untangling Lyonir_00042_.png variants forever. The gallery helps here more than it sounds, because it labels each thumbnail with its actual filename.

Not a replacement for a proper save node if you batch heavily. It writes the same files core does, one per image in the batch, and the history fills with all of them. For a 200-image batch you're better off with a plain SaveImage and its own folder.

CategoryLyonir Studio/Image

Inputs (4)

NameTypeDefaultDescription
imageIMAGEImage or image batch to save.
filename_prefixSTRINGLyonirFilename prefix for saved images.
subfolderSTRINGLyonirSubfolder inside ComfyUI/output used by this gallery.
history_limitINT184โ€“100Maximum number of recent thumbnails shown in the node.

Outputs (1)

NameTypeDescription
imageIMAGEโ€”