Nodes/Basic data handling/create Data List from INTs
ComfyUI Node

create Data List from INTs

Build an INT list from plain numbers — the dynamic-input list builder

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

    Seeds, steps, batch sizes, resolution sides - half the numbers in a workflow are integers, and every so often you need a collection of them: a list of seeds to cycle through, a set of widths to test, a stack of CFG values for an A/B run. create Data List from INTs is the node that assembles that list without any Python.

    It's part of Basic data handling, StableLlama's zero-dependency pack of standard-library Python functions turned into nodes. This is the INT-flavored version of the pack's generic list builder - there are siblings for FLOAT, BOOLEAN, and STRING, and they all behave the same way.

    How it works

    The node exposes a single input, item_0, but that's a lie in the best way. The input is dynamic - right-click (or drag) to add item_1, item_2, and so on, and each one becomes another element in the output list. Under the hood the pack uses a dynamic-input container that extends the schema based on how many inputs you've wired up, so the widget count always matches what you actually connected. Values are coerced to int, so 2.0 becomes 2.

    Output list is an INT-typed data list. And here's the important part about what a "data list" is in ComfyUI: it's a batch. Connect it to a node that expects a single INT - say a seed input - and ComfyUI will run that node once per item, processing each element individually. That's the whole point of this pack's Data List family: build the list once, feed it into the graph, let ComfyUI fan it out.

    What you set

    • item_0 (INT, optional) - the first value; the starting widget. Add more as needed.

    That's it. One output, list, ready to wire into any INT input you want to iterate over.

    Installing it

    ComfyUI Manager → search "Basic data handling", or:

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

    Restart. No dependencies, no models.

    Common issues

    • "The list has a trailing empty element." The dynamic container reserves a slot; if you leave a blank input it becomes an empty string that coerces oddly. Fill or disconnect every widget you're not using.
    • "I expected list to be a single value." It's a data list, not a LIST - that distinction matters in this pack. If you want the whole collection to travel as one opaque Python object (say, to hand to a loop counter), use the to LIST cast node or the LIST family instead.
    • "My float became an int and I lost precision." That's the coercion doing its job. For decimal lists use the FLOAT version of this node.
    CategoryBasic/Data List

    Inputs (1)

    NameTypeDefaultDescription
    item_0optINT

    Outputs (1)

    NameTypeDescription
    listINT