ComfyUI Node Runs on cloud

ExtendIntList

Concatenate Int Lists When You Refuse to Count Manually

By bmad4ever·Created 3 years ago·Updated 9 months ago· 70
ExtendIntList
    • INT
    inputs_len2

    ExtendIntList is the integer-flavored twin of the whole Extend*List family in bmad4ever's comfyui_bmad_nodes pack: it takes several INT lists and joins them end-to-end into one list, preserving order. That's the entire job. It's a connector, not a calculator, and it exists because ComfyUI's batch tooling keeps wanting a list of integers while your workflow keeps producing them in pieces.

    Why you'd reach for it

    The natural prey here is seeds. You almost never want a single seed - you want a handful to try, and different parts of a workflow (or different branches of the same graph) can hand you separate lists. ExtendIntList merges them so one batch driver iterates the whole set. It also shines for step counts, batch sizes, and anything where you're sweeping integers across runs.

    Concrete case: branch A produces the seed list [123, 456] and branch B produces [789]. Wire both in, and the output is [123, 456, 789]. Same mechanism as ExtendFloatList, just for whole numbers.

    How it works

    One widget: inputs_len (default 2, up to 32) sets how many INT-list inputs the node exposes. Remember the README's ❔ marker: after changing inputs_len, you have to right-click the node → "update Inputs" for the new sockets to show up. The implementation is a straight list.extend() over each input in order, so ordering is predictable and cheap.

    Every input socket is typed as a list of ints (the [ ] on the socket is your cue). If you try to plug a single INT value in, the graph won't connect - wrap it with the pack's ToIntList node first, or use a node that already emits an int list.

    Install

    Same pack install as everything else from Bmad:

    cd ComfyUI/custom_nodes
    git clone https://github.com/bmad4ever/comfyui_bmad_nodes
    

    then restart ComfyUI. ComfyUI Manager users: search "comfyui_bmad_nodes" and install from there - it handles the pack's Python dependencies (opencv-python, scikit-image, simpleeval, gray2color) automatically. None of those matter for this node, which is pure Python list handling.

    Common issues

    • Forgot the right-click step. inputs_len looks like it should just work, but the sockets only appear after "update Inputs". This trips up basically everyone once.
    • Value type mismatch. You're feeding it floats, or a single int. Ints in, int list out.
    • Order surprises. Concatenation follows input order top-to-bottom. If your seed sweep comes back scrambled, check which slot holds which chunk.

    That's the whole story. It's a two-second node that prevents an entire category of "why is my batch wrong" headaches.

    CategoryBmad/Lists/Extend

    Inputs (1)

    NameTypeDefaultDescription
    inputs_lenINT20–32

    Outputs (1)

    NameTypeDescription
    INTINT