Get Int From List | akatz-loops
Pull One Integer Out of an Int List by Index
- INT
Once you've got a list of integers - generated by IntegerListGeneratorNode, assembled with MakeListNode, or converted out of a loop's accumulation - the next thing you almost always want is one of them, chosen by index. That's this node's entire job: list in, index in, one INT out. It's my_ints[index] as a node, nothing more.
Two inputs, both boring and exactly what they look like:
- list - an INT list (the output of an int-list-producing node).
- index - zero-based position, default
0, up to 100000.
The output is the integer at that position. Wire the index from a loop counter or a seed and you've got dynamic selection: pick seed #3 of a list of seeds, use iteration #2's value as the batch count, pull the step count for pass N. The classic use is driving variation - a IntegerListGeneratorNode produces a batch of seeds or CFG values, and this node hands one to the sampler per run, so a single workflow sweeps through a whole parameter list without you editing anything.
The bounds trap
The index is unchecked. Ask for index 9 of a 5-element list and you'll get an IndexError that kills the run - no clamping, no graceful None. If your list length is dynamic, guard the index (compare against AccumulationGetLength or a PrimitiveInt length you control) before it reaches this node. For the common case of a generator with a fixed quantity, just keep the index below it.
Also note the type discipline: this is the int picker. The pack ships a sibling, GetFloatFromList, for FLOAT lists, and the two don't cross - an int list won't cleanly feed the float node's socket and vice versa. For non-numeric lists, AccumulationGetItem is the general-purpose equivalent (it works on the ACCUMULATION type and returns any type). If you're pulling from a regular list of images or strings, you're in the wrong node's territory.
Install
Part of Akatz-Loop-Nodes (akatz-ai). Via ComfyUI Manager, search "Akatz-Loop-Nodes"; or:
cd ComfyUI/custom_nodes
git clone https://github.com/akatz-ai/Akatz-Loop-Nodes
Restart ComfyUI. Pack dependency is opencv-python (used by the image nodes), no models. The custom_nodes.ComfyUI-Execution-Inversion module path shown on listings is the pack's lineage from BadCafeCode's execution-inversion demo - not a package you install.
The most common non-error confusion: feeding it a list and getting back what looks like the whole list. That happens when the upstream node wasn't actually emitting a list - if IntegerListGeneratorNode isn't wired directly, check that the list really is list-typed before you blame the picker.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| list | INT | — | |
| index | INT | 00–100000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |