Qwen Edit List Extractor
Pull one item out of a list by index
- items
- item
A one-job node, and it does exactly what the name says: give it a list and an index, get back the item at that position. It exists because the rest of this pack passes things around as lists - the Custom node hands you a vae_images list, a ref_latents list, a vl_images list through the Output Extractor - and eventually you need one of those things, not the whole collection. This is the node that reaches in and grabs it.
Nothing about it is Qwen-specific, despite the name. It's a generic list indexer that happens to ship in a Qwen pack because that's where the lists come from.
How it works
It takes the list, reads the integer index, and returns that element. That's the entire operation. Because the item comes out typed as ANY, you can pull anything - an image, a latent, a config, whatever the list held - and then, if a downstream node is picky about types, follow it with QwenEditAny2Image or QwenEditAny2Latent to tell ComfyUI what it actually is.
The inputs and outputs that matter
Both inputs are required:
- items - the list to index into. In practice this is one of the list outputs off QwenEditOutputExtractor (
vae_images,ref_latents,vl_images). - index - which position to grab, default 0. It's 0-indexed, so 0 is the first item, 1 the second, and so on (range goes up to 1,000,000, which you will not need).
Output: item - the extracted element, typed ANY.
Where it fits in a real graph
The typical chain: TextEncodeQwenImageEditPlusCustom hands its bundle to QwenEditOutputExtractor, which exposes the vae_images, ref_latents, and vl_images lists. Those lists are collections - you rarely want all of them at once, you want, say, the second processed VAE image to composite or the first reference latent to sample from. ListExtractor is the reach-in. Set the index, take the item, and because it comes out as ANY, follow it with QwenEditAny2Image or QwenEditAny2Latent so the next node will accept the type. That three-node tail - extract the bundle, pull one item, cast it - is the standard way to get a single usable thing back out of the Custom node's deliberately compact output.
Installing it
Comes with the pack. ComfyUI Manager: search Comfyui-QwenEditUtils, install, restart. Or cd ComfyUI/custom_nodes && git clone https://github.com/lrzjason/Comfyui-QwenEditUtils, restart. No models, no dependencies.
Common issues
Off-by-one is the whole risk surface here. The index is 0-based, so if you're thinking "the second image" that's index 1, not 2. Point it past the end of the list and you'll get an out-of-range error rather than a silent nothing - check how many items the source list actually holds. And because the output is ANY, a downstream node may refuse it until you cast it: run the item through Any2Image or Any2Latent to set the type. That's genuinely all there is to this node; it's glue, and glue is allowed to be boring.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| items | LIST | — | |
| index | INT | 00–1000000 | Index of the image |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| item | ANY | — |