Nodes/ComfyUI-Apt_Preset/IO_store_image
ComfyUI Node

IO_store_image

Buffer images across runs, then release them as a batch

By cardenluo·Created 2 years ago·Updated 18 days ago· 309
IO_store_image
  • image
  • image
  • release_total
image_outputPreview
release_total0

If you're generating images one at a time across several runs - a loop, a queue of jobs, a manual "run it again" pattern - and you actually want them as a single batch at the end, IO_store_image is the accumulator for that. It quietly keeps every image you feed it, and releases them together once you tell it how many you're expecting.

How it works

The node's own documented logic is precise about this, so it's worth stating plainly. When every stored image is the same size: if release_total is 0 or less, it just outputs everything it's holding. If release_total is set above zero, three things can happen - the stored count equals release_total and it outputs everything; the stored count is less than release_total and it outputs nothing yet (still waiting); or the stored count is more than release_total, in which case it outputs however many images from the end of the buffer match that target count. If the stored images aren't all the same size, none of that batching logic applies - it just outputs the single most recent image instead, since a mismatched-size batch can't be stacked into one tensor anyway.

image_output controls what happens visually as images stream through: Hide, Preview, Save, or Hide/Save - default is Preview, so you'll see each frame as it arrives even before the batch releases.

Inputs and outputs

  • image - feed one image per run; the node accumulates it internally.
  • release_total - how many images to wait for before releasing the batch (0 or less means "just pass everything through now").
  • image_output - Hide / Preview / Save / Hide-Save for each incoming frame.

Two outputs: image (the released batch, or the single latest image if sizes don't match) and release_total (INT) - handy for chaining into whatever downstream node needs to know how many images actually came out.

How to install it

ComfyUI Manager → search ComfyUI-Apt_Preset, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git

then run install.bat for dependencies (Windows-only - on Linux/macOS run its pip install lines by hand) and restart ComfyUI.

Common issues & troubleshooting

Nothing comes out and the workflow just seems to stop. That's expected behavior when release_total is set above zero but the buffer hasn't reached that count yet - the node is waiting, not broken. Check how many times you've actually run the graph against what release_total expects.

Only getting one image back when you expected a batch. If the images you fed it weren't all the same resolution, the node falls back to returning just the latest one - batching only works when every stored image matches in size. Standardize your resolution upstream if you need the full batch.

IMPORT FAILED on startup. This pack has at least one reported import failure in the wild on a stock install, generally traced to skipping install.bat's dependency step - which has to be run manually off Windows. Check the console log for the actual missing package before reinstalling.

CategoryApt_Preset/IO_Port

Inputs (3)

NameTypeDefaultDescription
imageoptIMAGE
image_outputoptCOMBOPreview4 options: Hide, Preview, Save, Hide/Save
release_totaloptINT0

Outputs (2)

NameTypeDescription
imageIMAGE
release_totalINT