Nodes/ComfyUI-988/Sequence Generator 988
ComfyUI Node

Sequence Generator 988

A tiny DSL for making number ladders

By kajan988·Created 3 months ago·Updated about a month ago· 1
Sequence Generator 988
    • int_list
    • float_list
    • info
    expression0...1+0.1

    "Run this at CFG 3, 4, 5 and 6," you say, and then you sit there typing four separate values into the widget. Sequence Generator 988 is the node for people who'd rather type 3,4,5,6 once and let the graph do the rest. It's a mini number-language in one input box, and it outputs proper lists you can sweep a batch through.

    The syntax

    Everything happens in the single expression field. Three forms, and they cover most of what you'll ever want:

    • x...y+z - arithmetic step: 0...1+0.1 (the default) gives 0.0, 0.1, 0.2, … 1.0. This is your denoise-strength or CFG ladder.
    • x...y#z - evenly spaced: 0...1#5 gives exactly 5 values spread between 0 and 1. This is your "5 evenly spaced points" sweep.
    • x,y,z - literal list: 4,8,16,32 just lists values. For when you want a hand-picked set.

    Commas separate multiple ranges too, so 1...5+1,10,20 merges a range and two literals into one list.

    Inputs and outputs

    One input (expression), and it's the whole node. Outputs:

    • int_list - the sequence as INTs (for steps, steps counts, seeds).
    • float_list - the same sequence as FLOATs (for CFG, denoise, strength sweeps).
    • info - a human-readable summary of what it parsed, which is worth checking once because it tells you whether the parser interpreted your expression the way you intended.

    It's an output node, so the generated list also renders on the graph.

    When to reach for it

    Parameter sweeps, basically. The pattern that keeps coming back in the KB's troubleshooting and concepts docs is "the right number is a sweep away" - CFG, steps, denoise strength are all knobs where a quick ladder beats a guess. Feed the list into whatever takes a list (a batch/sweep-capable node, or a loop), and every item gets its own run with its own value. For a node this small, the info summary is a genuinely thoughtful touch - you can see at a glance that 0...1#5 came out as five evenly spaced floats rather than a step sequence.

    Gotchas

    • 0...1+0.1 can bite you on floats. 0.1 in binary is the usual mess; the node rounds to 2 decimal places, which mostly fixes it but means your 0.1 ladder can end at 1.0 or 0.99 depending on rounding. Read info to confirm.
    • It outputs lists, not scalars. Wire into list-consuming nodes; a single scalar consumer will just take the first item.
    • If the parser can't read a segment it coerces to 0.0 rather than erroring - a typo produces a silent zero in your list, which is exactly the kind of thing the info output is for.

    Install

    Part of ComfyUI-988: Manager (search "ComfyUI-988") or:

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

    Then restart. Pure string parsing and list math - no dependencies beyond the pack's minimal set.

    Category🦇988/Number

    Inputs (1)

    NameTypeDefaultDescription
    expressionSTRING0...1+0.1

    Outputs (3)

    NameTypeDescription
    int_listINTInteger sequence
    float_listFLOATFloat sequence
    infoSTRINGHuman-readable summary