Nodes/GraftingRayman/GR INT Incremetor
ComfyUI Node

GR INT Incremetor

A persistent counter for your filenames and loops

By GraftingRayman·Created 2 years ago·Updated about a month ago· 76
GR INT Incremetor
    • INT
    • STRING
    prefix
    start_value0
    seed0

    Yes, "Incremetor" - not a typo you need to fix in your own notes, that's genuinely the node's name. What it does is simpler than the spelling suggests: it hands you a number that goes up by one every time you queue a run, plus a matching string with your prefix stuck on the front. If you've ever manually bumped a number in a filename prefix so your outputs don't overwrite each other, this replaces that habit with a node.

    How it works

    You set a start_value and a prefix. Each queue, the node increments its internal counter and outputs both the raw INT and a STRING that combines your prefix with the current number - something like character_7 if your prefix is character_ and the counter's sitting on 7. That string is built for exactly the use case you'd expect: feed it into a filename prefix on a save node, and every run gets a distinct, ordered name automatically, no manual bumping required.

    The seed input is worth understanding rather than ignoring. ComfyUI caches a node's output when its inputs haven't changed, which would normally mean a counter node just returns the same number forever since nothing about it looks different between runs. Wiring seed to a randomized or auto-incrementing seed widget (the same trick people use elsewhere to force re-execution) is what actually gets this node to advance - without something upstream changing between queues, don't be surprised if the counter appears stuck.

    The inputs and outputs that matter

    • prefix (STRING, multiline) - the text glued to the front of the string output. Leave it empty if you only want the raw number.
    • start_value (INT, default 0, range 01,000,000) - where the counter begins.
    • seed (INT) - not used as a "seed" in the random-generation sense here; its real job is giving the node a changing input so ComfyUI doesn't cache a stale result. Wire it to an auto-randomizing seed widget rather than leaving it fixed.
    • INT (output) - the raw counter value, for anything numeric downstream (batch indices, math nodes, etc.).
    • STRING (output) - prefix plus number as one string, built for filename prefixes.

    How to install it

    Via ComfyUI Manager: search "GraftingRayman", install, restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/GraftingRayman/ComfyUI_GraftingRayman
    

    then restart. This pack has one dependency that applies across every node in it, this one included - OpenAI's CLIP package, separate from ComfyUI's built-in CLIP handling:

    # portable build
    .\python_embeded\python.exe -m pip install git+https://github.com/openai/CLIP.git
    
    # system python
    pip install git+https://github.com/openai/CLIP.git
    

    Without it, none of the GraftingRayman nodes register, including this one.

    Common issues & troubleshooting

    Counter never moves. This is the most common complaint with any counter-style node in ComfyUI, and it's almost always caching. Make sure seed is wired to something that actually changes each queue (a widget set to randomize, or any other node output that varies run to run) - a fixed seed value gives ComfyUI no reason to treat this node as "dirty," so it just replays the cached result.

    Node isn't in your search results. Check the CLIP install above first - the pack fails to import as a unit if it's missing, which takes every node down regardless of what it actually does.

    Number resets unexpectedly. The counter's state lives with the running ComfyUI server session, not saved permanently in your workflow file - a server restart, or reloading the workflow fresh, will reset it back to start_value. If you need output numbering that survives restarts, that's a job for the filename-collision handling in your save node instead, or note down where you left off before restarting.

    Categorycustom

    Inputs (3)

    NameTypeDefaultDescription
    prefixSTRING
    start_valueINT00–1000000
    seedINT00–18446744073709550000

    Outputs (2)

    NameTypeDescription
    INTINT
    STRINGSTRING