πͺ β±οΈ Recent Outputs
Pull the newest images out of your output folder, no dragging files anywhere
- IMAGE
The loop everyone falls into: generate a batch, see twelve you like, then drag each one back onto the canvas to push it through an upscale or a face pass. LoadImage needs a file in input/, so you're copying files around or re-uploading them. This node skips all of that - it reads straight out of the output directory and hands you one image tensor, which you gate with an index you can step.
Concretely: pass one generates and saves, pass two starts with this node, amount set to the size of your last batch, and index incremented per queue press. It's the missing "reopen what I just made" half of the save/load cycle.
How it works
output_folder is either the literal word output (or blank), which resolves to ComfyUI's real output directory, or a path that gets sanitized and confined - only things inside ComfyUI's input and output trees survive. It then walks that directory recursively, collects .png, .jpg, .jpeg, .webp and .bmp, sorts everything by modification time, keeps the newest amount files, and picks the one at index. If index is bigger than the pool it wraps around instead of erroring. order flips the whole thing to oldest-first if you'd rather work through a batch chronologically.
The image comes back EXIF-rotated and converted to RGB - the same normalization core's LoadImage does, so a JPEG straight off a camera or a phone won't arrive sideways.
Inputs and outputs
Three widgets and one advanced one:
output_folder-outputby default. Subfolders work (output/upscales) as long as they're inside the ComfyUI directories.amount- how many of the newest files to keep in the pool, 1 to 100, default 5.index- which of those to emit, 0 = newest. It ships withcontrol_after_generateset to increment, so queue the same workflow repeatedly and it walks down the pool by itself.order-Newest First (0 = latest)orChronological (Oldest First).
The single output is IMAGE - one image, batch of one. Feed it into a VAE encode, a hires second pass, an upscaler, or a face detailer.
Install
ComfyUI Manager β search SaturnNodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/KOFiblto/ComfyUI-SaturnNodes
Restart ComfyUI. requirements.txt is Pillow, numpy and piexif - no model downloads, no CUDA extensions, no install script. The node lives in πͺ SaturnNodes/Loaders.
Where people get burned
You get a black square instead of an error. If the folder doesn't exist, is empty, or every file fails to open, the node returns a black 512Γ512 dummy tensor and keeps going. Downstream nodes cheerfully process it. If your upscale output is pure black, check the pool before you check the upscaler.
Absolute paths get quietly ignored. Point output_folder at D:\renders or /mnt/photos and the sanitizer rejects it (absolute paths and .. are blocked) and falls back to the ComfyUI output directory. Same symptom: black frame, or images from somewhere you didn't ask for.
Your index means something different next run. Ordering is by file modification time across the whole tree, so anything else writing into output/ - a different workflow, a batch save, an upscaler that saves into a subfolder, a video export - reshuffles the pool. Lock the workflow to one folder and clear it out if you need a stable index.
amount too small. With amount at 5 and a batch of 8, you're only ever able to reach the newest five. Raise amount to at least your batch size, then step through with index.
Don't use this for previews you never saved. ComfyUI's PreviewImage writes to temp/, not output/, so those files aren't in the pool at all. Only SaveImage output shows up here - worth knowing before you go hunting for an image that was never on disk.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| output_folder | STRING | output | β |
| amount | INT | 51β100 | β |
| index | INT | 00β1000000 | β |
| order | COMBO | Newest First (0 = latest) | 2 options: Newest First (0 = latest), Chronological (Oldest First) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |