Nodes/Basic data handling/create LIST from INTs
ComfyUI Node

create LIST from INTs

Create LIST from INTs — typed slots that catch your rounding mistakes

By StableLlama·Created about a year ago·Updated 4 days ago· 48
create LIST from INTs
    • LIST
    item_0

    When every element you want in a list is a whole number - seeds, counts, widths, frame indices - reach for create LIST from INTs. It's the typed sibling of create LIST: same growing list of item_N slots, but each slot is typed as INT and every value is coerced with int() before it's stored. You get a list you can feed straight into max, min, sum, or sort without wondering whether a rogue float or string will break the comparison.

    How it works

    Each item goes through Python's int() on the way in:

    values = [int(value) for value in list(kwargs.values())[:-1]]
    

    For inputs that are already integers, it's a no-op. For floats, note that int() truncates toward zero - 3.9 becomes 3, not 4. If you're feeding in float values and you wanted rounding, that's a different operation; this node just floors the decimal part. And if you wire in something that isn't number-like, int() will raise and the node will error out - which, honestly, is the point: a typed list should catch the mistake instead of silently propagating it.

    The trailing empty slot is dropped, same as every create-node in the family. Output is a single LIST of integers.

    Where you'd use it

    • Seed banks. Assemble a set of seeds to cycle through.
    • Index math. Build lists of frame numbers or batch positions for video work - this pack gets used in real WAN image-to-video workflows for exactly this kind of bookkeeping.
    • Comparable lists. Integer lists feed cleanly into ListMax, ListMin, ListSort, and ListSum, all of which expect items they can order or add.

    Installing

    It's in the "Basic data handling" pack by StableLlama. ComfyUI Manager: search "Basic data handling", install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/StableLlama/ComfyUI-basic_data_handling
    

    Restart ComfyUI. No dependencies, no model downloads - pure Python wrappers, the least fussy install in the ecosystem.

    Gotchas worth knowing

    • int() truncates: 3.9 becomes 3. Round first if you actually wanted 4.
    • Non-numeric input errors out - that's the guardrail working, not a bug.
    • The trailing empty slot is dropped, so you can't end the list with an empty string. And as with every node here, this is a LIST (one Python list variable), not a native data list.
    CategoryBasic/LIST

    Inputs (1)

    NameTypeDefaultDescription
    item_0optINT

    Outputs (1)

    NameTypeDescription
    LISTLIST