Tensor Batch to Image
Pull one image out of a batch by index
When ComfyUI generates a batch of images, they travel down the wire as one bundled tensor - a stack, not four separate pictures. Most of the time that's fine. But sometimes you want to grab one of them to work on by itself, and that's what Tensor Batch to Image is for. The WAS README describes it as selecting "a single image out of a latent batch for post processing with filters." You give it a batch and an index, it hands you back one image.
The reason this comes up: a lot of post-processing nodes are happier with a single image, and sometimes you specifically want to pluck one result out of a batch - the third of four variations, or one tile out of a set. In fact the README calls this out as the natural partner to WAS's Image Tile node: tile an image into a batch of pieces, then use Tensor Batch to Image to pull out the individual tile you want to work on.
How it works
A batch tensor has an index dimension - image 0, image 1, image 2, and so on. This node slices out the one at the index you specify and outputs it as a standalone image. Nothing is transformed; it's a selection, like grabbing one photo off a contact sheet. The rest of the batch is simply not carried forward on that output.
The inputs and outputs that matter
- The image batch in - the bundled stack of images.
- An index - which image in the batch you want (counting from the start).
- The single image out - that one picture, ready for a filter, an upscale, or a save.
I'm describing these from the README's stated behavior rather than a formal schema, so I won't invent exact widget labels - but batch-plus-index in, one image out is the whole job.
How to install it
Bundled in the WAS Node Suite:
- ComfyUI Manager: search was-node-suite-comfyui, install, restart.
- Manually:
cd ComfyUI/custom_nodes && git clone https://github.com/WASasquatch/was-node-suite-comfyui/, thenpip install -r requirements.txtagainst your ComfyUI Python, and restart.
No model, no heavy dependency - it's a selection node.
Common issues
The one that bites: off-by-one and out-of-range indices. Batches count from 0, so the "first" image is index 0, not 1 - ask for index 4 in a batch of 4 and you're reaching past the end, which errors or returns nothing. If you're getting an empty or unexpected result, check that your index is within the batch size and that you're counting from zero.
Second, make sure you actually have a batch. If only one image is flowing through, this node is redundant, and if you wired something that isn't an image batch into it, the selection won't make sense. It pairs naturally with anything that produces a batch - a multi-image sampler run, Image Tile, or an image-batch node - so it belongs downstream of one of those.
And the pack caveat: WAS Node Suite has been retired since December 2023 - used constantly, unmaintained. If a ComfyUI update makes every WAS node vanish with an "Import Failed", that's suite-level dependency drift, not this node. Re-run requirements.txt against the correct Python environment (or the bundled install.bat) and restart.
Inputs (0)
No inputs
Outputs (0)
No outputs