Nodes/ComfyUI Ino Nodes/Ino On Image List Completed
ComfyUI Node

Ino On Image List Completed

A persistent counter on every image

By nobandegani·Created about a year ago·Updated 2 months ago· 6
Ino On Image List Completed
  • input_image
  • output_image
  • current
parent_folder
folder
count0

Batch processing has a nasty habit: you're 300 images into a 1,000-image run, the computer crashes, and you restart to find no way to know where you left off. InoOnImageListCompleted is the answer - a node you drop at the end of an image-processing chain that keeps a persistent counter in the folder you're processing. Every image it sees bumps the counter, the count is saved to a counter.json file on disk, and it remembers across restarts. That's the kind of thing that separates a toy batch pipeline from one you'd actually trust with an overnight job.

The design is clever because it's stateless-until-you-want-it: ComfyUI itself doesn't persist a counter between runs, so the node writes its progress to disk. It also deliberately makes itself re-run every time by using a fresh timestamp as its fingerprint, which is ComfyUI's way of saying "always execute, don't dedupe me" - so the counter keeps counting on each new run instead of ComfyUI deciding the node already ran.

How it works

Required inputs: input_image (the IMAGE flowing through your chain), parent_folder (input/output/temp), folder (where the counter.json lives - same folder you're processing makes sense), and count (an INT, default 0 - think of it as "how many this run expects," though the persistent file is the real source of truth).

Outputs: output_image (the same image passed through, so you can keep chaining) and current (the running count after this image, read from the counter file).

Mechanically: each execution reads counter.json from the folder, increments the counter, writes it back, and returns the incremented value. First run creates the file starting at 1. If the JSON read or write fails, it returns current: 0 rather than crashing.

Installing it

Ships with ComfyUI-InoNodes by nobandegani:

cd ComfyUI/custom_nodes
git clone https://github.com/nobandegani/comfyui_ino_nodes
cd comfyui_ino_nodes
pip install -r requirements.txt

Or search "ComfyUI Ino Nodes" in ComfyUI Manager, install, restart. V3 schema pack - current ComfyUI required.

Common issues

The counter lives in the folder, so the pairing of parent_folder + folder must be stable between runs - change it and you silently start a fresh counter (or, worse, keep counting someone else's file). Also, the counter is append-only per run: it doesn't reset when you finish a batch, so if you want each batch to start at 1, delete the counter.json (or point the node at a fresh folder) between jobs. And because the node is an output node that always executes, it's meant to sit at the tail of your chain - feed it the final image of each iteration and read current to drive a progress indicator or a "stop when current >= target" branch.

CategoryInoImageHelper

Inputs (4)

NameTypeDefaultDescription
input_imageIMAGE
parent_folderCOMBO3 options: input, output, temp
folderSTRING
countINT00–10000

Outputs (2)

NameTypeDescription
output_imageIMAGE
currentINT