Nodes/ComfyUI Ino Nodes/Ino Increment Batch Name
ComfyUI Node

Ino Increment Batch Name

Batch_00001 → Batch_00002, on every run — the counter that names your outputs

By nobandegani·Created about a year ago·Updated 2 months ago· 6
Ino Increment Batch Name
    • string
    enabledtrue
    seed0
    nameBatch_00001
    dummy_string

    Timestamps give you uniqueness but not order - 20260816_143522 is useless for "give me the fifth run." When you want outputs numbered 1, 2, 3, ... across runs, Ino Increment Batch Name is the tool: feed it Batch_00001 and it returns Batch_00002; run it again and you get Batch_00003. The description spells it out: "Increments a batch name string (e.g. Batch_00001 -> Batch_00002)."

    The trick - and it's the part people miss - is that it's stateful across executions. ComfyUI doesn't keep variables between runs by default, but this node does, which is exactly what makes a persistent counter possible.

    How it works

    You give it a name (default Batch_00001) and it returns the next value, incrementing the numeric suffix while preserving the zero-padding width. Start at Batch_00001, and every execution hands back one more. There's a seed input wired for the pack's control-after-generate convention, plus a harmless optional dummy_string that exists to let you force the node to run - a common trick for nudging execution order in this pack.

    The mechanism that makes it tick is a persistent counter file stored by the pack (per the README's "persistent counter stored in the folder" pattern, which the same family uses for image-batch progress). That's what survives restarts.

    Inputs and outputs

    • name - the starting batch name. Keep the 00001 padding and the increment stays neatly aligned.
    • enabled - pack-wide toggle; off returns an empty string.

    Output: string - the incremented name, ready to feed a save node's filename prefix.

    Where it wires in

    Straight into filename prefixes: each run of a workflow saves to Batch_00003_... instead of overwriting. It composes well with InoDateTimeAsString (timestamp + batch number) and with save nodes that take a prefix string. If you're doing long unattended batch runs, this is the node that keeps every pass distinguishable.

    Installing it

    Part of ComfyUI-InoNodes. ComfyUI Manager → search "ComfyUI Ino Nodes" → install → restart. Manual:

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

    Restart after. No keys, no models.

    Common issues

    The counter state is the whole gotcha. Because it persists, the node doesn't reset when you reload the workflow - if you expected to start over at 1 and it's showing 15, that's the persistent counter, and you reset it by resetting the name input. Also, don't try to increment on every image in a single batch - this increments per node execution, not per batch item; pair it with a batch-looping pattern if you need per-item numbers. And if you wire name to a fixed string from another node, the reset behavior can surprise you; keeping it as a literal is usually the saner setup.

    CategoryInoFileHelper

    Inputs (4)

    NameTypeDefaultDescription
    enabledBOOLEANtrue
    seedINT00–18446744073709550000
    nameSTRINGBatch_00001
    dummy_stringoptSTRING

    Outputs (1)

    NameTypeDescription
    stringSTRING