ComfyUI Node
Get from Index
Takes one item out of a batch of ANY type — images, masks, latents, audio, conditionings, or any list. Core needs a different node per type; this works the batch dimension out from the value, and the output socket takes the type you wired in. Negative indices count from the end, and the result keeps its batch dimension, so it drops straight back into anything that took the original.
Get from Index
- batch
- item
- index
- count
◄index0►
◄length1►
◄out_of_rangeclamp►
CategoryNynxz/Batch
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| batch | COMFY_MATCHTYPE_V3 | Any batched value: an IMAGE or MASK batch, a LATENT, an AUDIO, a CONDITIONING, or a list. | |
| index | INT | 0-4096–4096 | Which item, from 0. Negative counts from the end, so -1 is the last — the same convention as core's Get Image from Batch. |
| lengthopt | INT | 11–4096 | How many items to take from `index`. 1 is a single item; more returns a smaller batch. Trimmed to what is actually there. |
| out_of_rangeopt | COMBO | clamp | What an index past the end means. 'clamp' takes the nearest real item, matching core's nodes. 'wrap' counts round, for driving this from a counter. 'error' stops the run, for when an out-of-range index means something upstream is wrong. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| item | COMFY_MATCHTYPE_V3 | — |
| index | INT | The index actually used, after negatives and out_of_range were resolved — so a wrapped or clamped index is visible rather than guessed. |
| count | INT | How many items the incoming batch held. |