Nodes/Nodes for use with real-time applications of ComfyUI/Int Sequence πŸ•’πŸ…‘πŸ…£πŸ…
ComfyUI Node

Int Sequence πŸ•’πŸ…‘πŸ…£πŸ…

A Step Sequencer for Whole Numbers

By ryanontheinsideΒ·Created 2 years agoΒ·Updated about a year agoΒ· 82
Int Sequence πŸ•’πŸ…‘πŸ…£πŸ…
    • INT
    β—„always_executetrueβ–Ί
    β—„steps_per_item30β–Ί
    β—„sequence_modeforwardβ–Ί
    β—„values0, 5, 10β–Ί

    If you've met Float Sequence, you already know Int Sequence - it's the same step-sequencer logic, but the list holds whole numbers and the output is an INT. You type 0, 5, 10, it cycles through them on a timer, and outputs the current one. It's the node for when you want discrete, hand-picked values in a specific order, rather than a waveform doing its own thing.

    The behavior is identical to Float Sequence under the hood: a steps_per_item counter holds each value for N frames, and sequence_mode decides how to walk the list - forward, reverse, pingpong (bounce at both ends), or random. State persists between executions (current index, step counter, pingpong direction), so in a real-time loop that runs the workflow every frame, the sequence advances like a metronome. At 30 steps per item and 30fps, each value holds a second; drop steps_per_item to 1 and it changes every frame.

    The integer output makes it the natural fit for parameters that don't take fractions: sampler steps, a batch size that flips between 1 and 2, resolution presets, a frame skip count, or even which LoRA slot to engage. It's also a clean way to build "choreography" - the classic use is a three-stage effect where each stage is a preset number, and the sequence walks them like a song going verse-chorus-verse.

    The inputs that matter

    • values - the comma-separated integer list. Default is 0, 5, 10; 0, 100 is a two-position flip, 1, 2, 4, 8 is a staircase.
    • steps_per_item - frames per value; your tempo.
    • sequence_mode - forward, reverse, pingpong, random.

    Output: one INT.

    Install & notes

    Part of ryanontheinside/ComfyUI_RealtimeNodes - ComfyUI Manager (search "Control Nodes") or:

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

    always_execute on, as with every control node here - the sequence only steps because the node re-executes each frame. The parsing is strict-ish: it casts each entry with int(), so 0.5 in the list is a hard error, and a stray comma makes an empty entry that also throws. Keep the list clean. And note random mode only re-rolls when the step counter rolls over, so it holds each random value for steps_per_item frames rather than shuffling every frame. For floats, use Float Sequence; for anything you'd set with a spinner that doesn't accept decimals, this is the one.

    Categoryreal-time/control/sequence

    Inputs (4)

    NameTypeDefaultDescription
    always_executeBOOLEANtrueWhen enabled, the node updates every execution
    steps_per_itemINT301–1000Number of frames to show each item
    sequence_modeCOMBOforwardHow to move through the sequence
    valuesSTRING0, 5, 10List of integer values (comma separated)

    Outputs (1)

    NameTypeDescription
    INTINTβ€”