๐ธ Past Images [meti]
Your Last Few Generations, Drawn Right on the Node
- image
- image_name_opt
- image_path_opt
- reset_trigger
- passthrough
- history_names
- history_paths
The failure mode is universal: you generate nine images, the one you love is the third, and by the time you scroll the preview it's already been overwritten. ComfyUI's default Preview Image replaces itself every run, and Save Image buries files in output/. ImageHistoryBuffer (๐ธ Past Images) keeps the last 2โ10 generations in a live grid that renders on the node itself, aspect ratios preserved, so you can eyeball the whole session at once.
It's the second of three nodes in ComfyUI-Useful-Meti, a small pack by Mahdi Sharifi (Metixxx). Think of it as an iteration tool - for comparing outputs while you work, not for archiving.
How it works
The node holds a list in memory. Each run it appends a clone of whatever image it receives, trims the oldest once you exceed the preset, and pushes thumbnails to the frontend, where a small JS extension draws them as a grid directly on the node's canvas - a frame, a #N counter, and a truncated name under each - and resizes the node to fit the layout.
The reason it updates every run is ComfyUI's IS_CHANGED trick: the node returns NaN, which is never equal to itself, so the engine always re-executes it instead of skipping it via the cache. That's exactly what you want here - the grid must refresh - but it's also why you shouldn't drop this node in the middle of a heavy branch. An always-dirty node forces re-execution behind it (the KB's node-plumbing doc calls this out as a slow-graph footgun). Keep it at the end of the line.
Two limits to internalize. First, the history is in-memory: restart ComfyUI and it's gone. This is a compare-while-iterating tool, not a gallery - the thumbnails also get written to ComfyUI's temp folder, which is scratch space. Second, changing the preset wipes the history (it has to re-fit to the new size), and the ๐ด RESET button clears everything.
Inputs and outputs
image- the image batch to store. Wire your VAE decode or save node output here.preset- 2, 4, 6, 8, or 10 images. Older ones drop off the front automatically.image_name_opt/image_path_opt- both optional, both any-type. A name shows under the thumbnail and in the history list; a path labels the entry, and if it's a full file path it's stored as-is.reset_trigger- the button that nukes the whole grid.passthrough- the input image, untouched, so you can inline this node without changing your graph.history_names- a "[1] name" style list of the stored names.history_paths- a "[1] /path/to/file" list.
The string outputs are handiest wired into a text display if you want a readable log of what you generated this session.
Installing
Same as the whole pack: ComfyUI Manager, search "Useful-Meti", install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/metixxx/ComfyUI-Useful-Meti.git
Then restart. No extra dependencies - no requirements.txt, nothing to pip install. One practical note: the grid won't render unless the pack's web extension loads, so keep the custom_nodes folder intact (installing via Manager makes that automatic).
Gotchas
The grid lives in RAM, full stop. Long session, hundreds of runs, and the node only keeps what the preset allows, so memory stays bounded - but close ComfyUI and it's all gone. If you need to keep something, put a real Save Image after it.
Names default to "Image_1", "Image_2", โฆ if you don't feed image_name_opt, which makes a wall of numbered thumbnails after a while. If you're generating variations, wiring a label in pays off fast.
And the always-rerun caveat again, because it's the one that bites: this node re-executes every run by design. That's free at the end of a workflow and costs you if you wire it before heavy nodes - every run re-triggers everything upstream of it. End of the line, after the save, is where it belongs.
For the specific "compare two exact outputs" itch, rgthree's Image Comparer (a slide-to-compare) is the other tool people reach for - but that's A/B-ing two specific images, while this node is for watching a whole session scroll past on the canvas. Different jobs, and they complement each other nicely.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Input image batch to store in history. | |
| preset | COMBO | 2 Images | Maximum number of images to keep in history. Older images are automatically removed. |
| image_name_optopt | * | Optional: Custom name for the image. Shown in history list and under the grid. Example: 'my_cat' | |
| image_path_optopt | * | Optional: File path for the image. If full path (ending with .png/.jpg) is provided, it will be used directly. Otherwise, the name will be added to the path. | |
| reset_triggeropt | RESET_TRIGGER | Button: Click to clear ALL history (images, names, and paths). |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| passthrough | IMAGE | โ |
| history_names | STRING | โ |
| history_paths | STRING | โ |