π Image From List
Grab one image out of a batch by index
- image
- image
You've got a list of images flowing through your graph - a folder load, a batch someone handed you, the output of another list node - and you want exactly one of them. The fifth frame, the first, whichever. That's the whole job here: it indexes into a list and pulls out a single image. The pack's own one-liner is blunt about it - "get one image from a list by index" - and that's really all there is.
This is the inverse of the pack's Image List and Image Repeat nodes. Those bundle images into a list; this one reaches back in and takes one out. Think of it like list[index] in code, dropped into your node graph.
How it works
ComfyUI has a distinction that trips people up, and it's the key to using this node right: a list and a batch are not the same thing. A batch is several images stacked into one tensor that the model processes together. A list is several separate items that the graph iterates over one at a time. This node operates on the list kind - the sort that SDVN's Load Image Folder or Image List produce. It walks to position index and hands you that item as a normal single image.
Indexing starts at zero, so index 0 is the first image, index 2 is the third. Nothing exotic.
The inputs and outputs that matter
There are only two inputs, and both matter:
image- the list you're picking from. Wire in whatever produced your list of images.index(INT, default 0) - which one you want. 0 is the first.
The single output is image - one picture, ready to feed a VAE encode, a ControlNet preprocessor, a resize, a Save Image, whatever comes next.
How to install it
It ships with the SDVN pack, so you don't install this node on its own. Via ComfyUI Manager, search SDVN_Comfy_node, install, restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/StableDiffusionVN/SDVN_Comfy_node
pip install -r custom_nodes/SDVN_Comfy_node/requirements.txt
run that last line from your ComfyUI root, then restart. This particular node is pure logic - no models, no downloads, no heavy dependencies.
Common issues & troubleshooting
Index out of range. If your list has five images and you ask for index 9, there's nothing there. Keep the index below the length of the list. When you're driving the index programmatically, that's the first thing to sanity-check.
You fed it a batch, not a list. This is the big one. If your images arrived as a single batched tensor rather than a ComfyUI list, indexing behaves differently - the node is built around list semantics. If it's not returning what you expect, confirm the upstream node actually outputs a list (Load Image Folder and Image List do). Batches usually get sliced with a different node.
You wanted several, not one. This node is deliberately singular. If you need a subset - say, every image wider than 1000px - reach for the pack's Filter List or Any From List instead. This one is the "give me exactly index N" tool and nothing more.
Beyond that it's about as low-drama as a node gets. It moves no data around, it just points at a slot.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| index | INT | 0 | β |
| image | IMAGE | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | αΊ’nh Δược chα»n. |