EditUtils: List Extractor lrzjason
Grab one thing out of a LIST — that's the whole job
- items
- item
If you've wired up a Qwen-Image-Edit workflow with this pack, you've seen the outputs that come back as a LIST: vae_images, ref_latents, vl_images. Each is a stack of images, one per reference, and most of the time you only care about one of them - say, the reference that your main image got encoded into. That's the only job of ListExtractor_EditUtils. You feed it a list, tell it which index, and it hands back that single item.
It's the same idea as Python's items[index], wrapped in a node. The two inputs are items (a LIST, usually the vae_images or ref_latents output of QwenEditOutputExtractor_EditUtils) and index, an integer defaulting to 0 with a tooltip that says "Index of the image" - because this pack's lists are images more often than not. The output is a single item of type ANY, so whatever you pull out keeps its type and can feed an IMAGE, LATENT, or any other socket that matches.
Why does this node exist instead of you just wiring the list straight into something? Because ComfyUI doesn't index into lists for you. The output extractors emit a whole batch, and unless you want to iterate, you have to pick. This is textbook plumbing - the invisible connective tissue that ComfyUI is 70% made of (see the node-plumbing layer in the KB). Zero pixels touched, but you'll reach for it constantly once you start using the multi-image configs chain and want, say, just the main reference latent for a VAE Decode preview.
The one trap is the assert. Index out of range and the node throws Index out of range, and ComfyUI will show you a red error instead of a silent None. That's honestly a feature - it tells you immediately that you picked the wrong slot. If the list is longer than you expected, use a Primitive to drive the index and dial through it.
Install
Part of the lrzjason/ComfyUI-EditUtils pack. Install once via ComfyUI Manager (search "ComfyUI-EditUtils") or cd ComfyUI/custom_nodes && git clone https://github.com/lrzjason/ComfyUI-EditUtils, then restart. No extra pip packages - this pack only uses ComfyUI's built-in modules.
Troubleshooting
The only real failure mode is a wrong index. If you get "Index out of range", check which output you actually wired in - vae_images, ref_latents and vl_images are all lists but they have different lengths depending on your to_ref/to_vl flags. vl_images only contains images you asked to feed the vision encoder, so if all your configs had to_vl off, it's empty and index 0 already fails. That's not a bug; the list is telling you the truth about your settings.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| items | LIST | — | |
| index | INT | 00–1000000 | Index of the image |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| item | ANY | — |