RH Extract Image From ImageList
Pull one image out of a batch by index
- images
- image
Sometimes a RunningHub job gives you back a batch and you want exactly one image out of it - the third frame of a video, the second of four variations, whatever. RH_ExtractImage does that and nothing more: give it a list and an index, get back the single image at that position. It's the small, boring, genuinely useful node you end up dropping into half your graphs.
It's part of ComfyUI_RH_APICall, the pack that runs workflows on the RunningHub cloud and returns the results into your local ComfyUI. The execute node in that pack can hand back a whole batch of images or the frames of a video; RH_ExtractImage is how you grab one of them to save, upscale, or route somewhere on its own. No key, no network - it's local list-handling.
How it works
There's no cleverness to it. The node indexes into a list of images and returns the one you asked for. Indices are zero-based, so 0 is the first image, 1 the second, and so on. That's the whole mechanism.
A concrete reason you'd reach for it: chaining video segments. Say a RunningHub job returns a clip's frames and you want to continue the motion in a second pass. You pull the last frame out with this node and feed it back in as the starting image for the next generation, so the two segments line up. Grabbing one specific frame out of a returned batch - the last, the first, the one that looks best - is the bread-and-butter job here.
The inputs and output that matter
images(IMAGE) - the batch or frame list to pull from. Comes from the execute node'simagesorvideo_framesoutput, a folder loader, or any node that produces more than one image.image_index(INT, default0) - which one to take, counting from zero.
The output is image (IMAGE) - that single frame, ready to wire into a save node, an upscaler, or a preview.
Installing it
Ships with the pack. Nothing to download beyond the node itself, since the compute lives on RunningHub rather than your machine:
- ComfyUI Manager: search
ComfyUI_RH_APICall, install, restart. - Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/HM-RunningHub/ComfyUI_RH_APICall, then restart ComfyUI.
No API key needed for this node - it only touches images that are already in your graph.
Where people get stuck
Two ways to trip, both about counting:
- Zero-based indexing.
image_indexof1gives you the second image, not the first. If everything's off by one, this is why. Set it to0for the first frame. - Out of range. Ask for index
5from a batch of three and there's nothing there. Keep the index below the number of images in the list. If you're unsure how many you got, preview the source and count first.
If what you actually want is several images or a re-ordered subset rather than a single one, use the sibling RH_BatchImages instead - it takes a string like 0-3,4,5-7 and returns a batch. RH_ExtractImage is the right tool only when you want exactly one.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | The images list | |
| image_index | INT | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |