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

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

Cycle Through Exact Values on a Timer, Not a Waveform Guess

By ryanontheinsideΒ·Created 2 years agoΒ·Updated about a year agoΒ· 82
Float Sequence πŸ•’πŸ…‘πŸ…£πŸ…
    • FLOAT
    β—„always_executetrueβ–Ί
    β—„steps_per_item30β–Ί
    β—„sequence_modeforwardβ–Ί
    β—„values0.0, 0.5, 1.0β–Ί

    Float Control is great when you want a smooth wave, but sometimes you don't want a wave - you want to hit exact values in exact order. That's what Float Sequence is for. You type a comma-separated list like 0.0, 0.5, 1.0, 0.25, it cycles through them on a timer, and outputs the current one as a FLOAT. If Float Control is an LFO, this is a step sequencer.

    The sequencing model is straightforward: steps_per_item says how many frames to hold each value, and sequence_mode says how to walk the list. forward goes 0, 1, 2, 3, 0…; reverse goes backward; pingpong bounces at the ends (0,1,2,3,2,1,0…); and random jumps around. The node keeps state between executions - current index, a step counter, and a direction flag for pingpong - and only advances the index when the step counter hits steps_per_item. So at 30 steps per item and 30fps, each value holds for one second. Set it to 1 and it changes every frame.

    This is the node for the "strict choreography" side of real-time work. Want a brightness that jumps between 0 and 1 on a beat? That's 0, 1 with a short steps-per-item. Want a three-stage effect that evolves like a scene change? List the stages. Because the output is a plain float, it plugs into anything numeric - same as Float Control, but with your values instead of a waveform's.

    The inputs that matter

    • values - the comma-separated list. 0.0, 0.5, 1.0 is the default; whitespace around the commas is tolerated.
    • steps_per_item - frames per value. This is your tempo control.
    • sequence_mode - forward, reverse, pingpong, or random.

    Output: one FLOAT.

    Install & notes

    It's in 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
    

    Keep always_execute on, same as every control node in this pack - the sequence only advances because the node re-executes each frame. The one trap is the "random" mode: it uses a step counter too, so it only rolls a new value when the counter rolls over; it doesn't re-randomize every frame. And remember the values are floats you typed by hand, so if the list has a typo, the parse throws right there in the node. If you need a sequence of whole numbers, use the sibling Int Sequence instead - it's the same node with integer semantics.

    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.0, 0.5, 1.0List of float values (comma separated)

    Outputs (1)

    NameTypeDescription
    FLOATFLOATβ€”