ComfyUI Node

Int List

The pick-by-index node for seeds, steps, and batch counts

By shockz0rz·Created 3 years ago·Updated 2 years ago· 28
Int List
    • current value
    • list
    • list text
    index1
    int11
    int21
    int31
    int41
    int51
    int61

    Int List is the integer twin of Float List: six integer slots, an index in, the selected value out. It's the node you reach for when the thing you want to vary across a grid is whole-numbered - seeds, step counts, CFG on the integer side of things, batch sizes. Nothing about the mechanism is fancy; it's a glorified array lookup, and that's exactly why it's dependable.

    How it works

    Fill int1 through int6 (all INT, default 1), set index (1-based, min 1), and get three outputs:

    • current value - the selected integer (INT), wire this into a seed, steps, CFG, whatever takes an integer
    • list - all six as an INT_LIST
    • list text - the six values as strings (STRING_LIST), for labels or metadata

    Indexes past six clamp to the last value instead of erroring. The whole point is to be driven by a loop: Create Image Grid's x_index or y_index into index, and every cell of the grid gets its own integer.

    The classic use: seed sweeps

    Seeds are the poster child. In a grid, you want the same seed across a row to isolate one variable, but across rows you want different seeds to check that your result isn't seed-luck. Int List is the straightforward way: six seed values, index them by row, done. It also composes with the pack's Int to Text if you want that seed echoed into the prompt text for reproducibility - one number, two destinations.

    If six slots feel limiting or you'd rather paste a list, the sibling node Int List from Text Field does the same job with a text box and room for up to 100 values. Same three outputs, so downstream wiring doesn't change.

    Installing it

    Part of comfy-easy-grids - one install for the pack. ComfyUI Manager: search "comfy-easy-grids". Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/shockz0rz/comfy-easy-grids
    

    Restart ComfyUI. No dependencies beyond stock ComfyUI, no model files. It's under "EasyGrids" in the Add Node menu.

    Troubleshooting

    The usual suspects: 1-based indexing (slot int1 is index 1), and the silent clamp when index exceeds six - a grid that stops varying across cells is almost always an index running off the end of the list. If a value "won't change," check you're feeding index from the loop at all, and not relying on the default of 1.

    CategoryEasyGrids

    Inputs (7)

    NameTypeDefaultDescription
    indexINT1
    int1INT1
    int2INT1
    int3INT1
    int4INT1
    int5INT1
    int6INT1

    Outputs (3)

    NameTypeDescription
    current valueINT
    listINT_LIST
    list textSTRING_LIST