Reverse Image Batch
The two-second node that fixes frame order
- images
- images
One input, one output, one job
ReverseImageBatch flips the order of the images in a batch. That's it. Under the hood it's images.flip(0) - no math, no model, no resampling, no quality loss. Every pixel is untouched; only the sequence position changes.
That sounds like nothing until you need it, and then there's no substitute. The other 90% of ComfyUI is the part that touches pixels, and this lives in the invisible plumbing layer instead - the nodes that fight repetition and illegibility. This one fights order.
Why order even matters
An IMAGE in ComfyUI isn't a picture, it's a 4D tensor whose dimension 0 is the batch. Frame 0, frame 1, frame 2. Anything that consumes the batch reads it front to back: SaveImage numbers the files in that order (its counter suffix walks the batch), a video encoder writes the frames in that order, a first-frame/last-frame conditioning node decides which image is the start of your shot from which one it's handed first.
So the node is a fix for three real situations:
- You want the motion to run backwards. Generate the clip, reverse the batch, encode, done.
- Your frames are in the wrong order to begin with. Video people hit this constantly. In the Wan ecosystem, a commenter describes the pre-LoRA workaround as having "to generate this shot and reverse the frame order for the out-of-frame parts of Yor to be rendered correctly" - the fix for a whole class of shots was reordering frames, not re-rolling the seed.
- You want a boomerang. Reverse the batch, join it to the original with an image-batch concat node, and a forward-and-back loop comes out of a single generation. That's the trick this node is genuinely best at, and it's two wires.
How to use it
Wire any IMAGE into images, take images out the other side. Insert it wherever the order needs flipping - straight after your batch loader or sampler, or just before a save/video-encode node.
There's nothing to configure and nothing to download. The install is the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/wenchengxiang/ComfyUI-Practical-Tools
# restart ComfyUI
Or ComfyUI Manager → search ComfyUI-Practical-Tools. This node has zero dependencies of its own - the pack's requirements.txt (onnxruntime, nvidia-vfx, openai) is for other nodes in it, and the loader imports each node file separately, so a failed dependency elsewhere just prints [WCX Nodes Error] in the console and leaves this one working.
Where people get burned
It only reverses IMAGE. If you're carrying a paired MASK batch or a LATENT batch through the same workflow, it stays in the original order and your images and masks silently desync - a reversed portrait batch against an unreversed mask batch means face masks landing on the wrong frames. Reverse the mask batch too (this pack has nodes for that as well) or don't reverse anything.
A batch is not a queue. This flips the frames inside a single batch_size. If you're running with "batch count" instead, you're getting N separate executions of one image each, and inserting this node does nothing visible. Batch size is the tensor; batch count is a loop.
One image stays one image. A batch of size 1 flips to itself. If you wired this in and nothing changed, count how many images are actually flowing through before you blame the node.
Order is not free of side effects. Reversing before SaveImage means the file that used to be _00001_ is now _0000N_, which matters if you're stitching or labeling outputs downstream. Reverse as late in the graph as you can, and the plumbing stays boring.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |