Pick from List
Keep the Prompts That Matched the Images You Picked
- anything
- picks
The annoying follow-up question in ComfyUI is always the same: you generated a batch from ten different prompts, picked the two images you like, and now you want to know which prompts made them. Pick from List is the answer. You give it a list of anything - prompts, seeds, filenames, whatever was used per-image - plus a comma-separated string of indices, and it returns just the items at those positions.
It's built to pair with the Image Filter node. That node has an indexes output: a comma-separated string of the zero-based indices you selected. Wire that string straight into Pick from List's indexes input, connect your per-image data to anything, and out pops the matching subset. You picked images 3 and 7 out of ten? You get whatever was in slots 3 and 7 of your list. No guessing, no re-running the batch to find out.
How it works
anything- the list to pick from. Any type; the node is polymorphic.indexes- a comma-separated string of positions. Whitespace is stripped, and it's zero-indexed, matching how the filter node reports its picks.
Output picks is a list holding only the entries at those indices, in the order you listed them. Repeat an index and you get that entry twice. Out-of-range indices are skipped with a console warning rather than killing the run.
Installing it
Part of chrisgoringe/cg-image-filter. ComfyUI Manager, search "cg-image-filter" or "Image Filter":
cd ComfyUI/custom_nodes
git clone https://github.com/chrisgoringe/cg-image-filter
Restart ComfyUI. No dependencies, no models.
Gotchas
Indexing is zero-based and shared with the filter node - first image is 0. If you used pick_list_start on the Image Filter to make its indexes output human-readable (1-based), remember Pick from List expects real indices, not display indices. One more quirk worth knowing: if the node receives a list that itself contains a single list (a nested-list situation some graphs produce), it prints a warning and processes the inner list. And picks comes out as a list even when you pick one thing - keep that in mind before wiring it into a node that wants a single value.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| anything | * | — | |
| indexes | STRING | comma separated list of indexes. Whitespace stripped. Only these entries will be included. Zero indexed. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| picks | STRING | — |