Nodes/ComfyUI_Eclipse/Integer Generate
ComfyUI Node

Integer Generate

An integer that counts up every run β€” your queue-based batch stepper

By r-vageΒ·Created 10 months agoΒ·Updated a day agoΒ· 31
Integer Generate
    • int
    β—„value1β–Ί

    The plain Integer node gives you a number. Integer Generate gives you a number that moves. It's the same primitive, but with control_after_generate wired in so the value can increment, decrement, or randomize after every queue run. That one behavioral difference turns it from a static value into the counter at the heart of a batch workflow - the thing that steps through images, seeds, or frames while you sit back and let the queue run.

    The mechanism

    Look at the tooltip and you'll see the honest description: "Integer value to output or use with increment per queue." The node outputs the current value as an int, and then - depending on the control_after_generate setting on the widget - the displayed number steps by one (or randomizes) once the run finishes. This is the same control_after_generate mechanic that bites people on seed widgets everywhere: the value in the box after a run is the one that will be used next, not the one that just ran. With an incrementing counter that's usually what you want, but if you're tracking which index produced which output, the off-by-one can confuse - the counter updates after the fact.

    The "Generate" in the name is the giveaway: this node is meant to generate a sequence, not hold a constant. You can still type any value in and use it as a static integer if you want - it's a superset of the plain Integer - but that's not why you'd pick this one.

    Where it shines

    The classic pattern: wire it into a folder loader or a batch selector as the index, and every queue run automatically advances to the next item. Set it to increment, and a single workflow produces a series of outputs - one per image, one per seed, one per variation - without you touching anything between runs. It pairs naturally with the pack's batch and folder loaders (Load Image From Folder and friends) which are built for exactly this indexed-stepping style. Just remember the increment fires per queue run, so a workflow that runs internally loops won't advance it the way you might expect.

    Inputs and output

    • value - the current integer, default 1, full int64 range.
    • int (output) - the value, wired into any INT socket. One output, nothing else.

    Install

    Ships with ComfyUI_Eclipse:

    cd ComfyUI/custom_nodes
    git clone https://github.com/r-vage/ComfyUI_Eclipse
    

    Or install ComfyUI_Eclipse from ComfyUI Manager and restart. No dependencies, no models. If you want the counter behavior, this beats wiring control_after_generate onto a plain Integer yourself - it's the same thing, but the intent is explicit and the widget's there from the start.

    CategoryπŸŒ’ Eclipse/ Primitives

    Inputs (1)

    NameTypeDefaultDescription
    valueINT1-9223372036854776000–9223372036854776000Integer value to output or use with increment per queue.

    Outputs (1)

    NameTypeDescription
    intINTβ€”