Reverse Images And All Images
Flip a batch and stitch it back on
- images
- rev_image
- all_image
Dead simple, one job: it reverses the order of an image batch, and it also gives you the reversed batch concatenated onto the original. Feed it frames [1, 2, 3, 4] and you get [4, 3, 2, 1] out of one socket and [1, 2, 3, 4, 4, 3, 2, 1] out of the other.
The obvious use is the boomerang/ping-pong effect for animation and video. Generate a short clip, run it through this, take the concatenated output, and you've got a loop that plays forward then backward - smooth, seamless, no visible cut at the ends because the last frame is shared. It's the standard trick for turning a non-looping clip into something that tiles cleanly on repeat.
How it works
A ComfyUI IMAGE is really a batch tensor - a stack of frames. This node reverses that stack and, for the second output, sticks the reversed copy after the original. No interpolation, no re-encoding, no model. It's just reordering and concatenating tensors, so it's instant and lossless.
The inputs and outputs
One input:
- images - the source batch (
IMAGE). A single image works but is pointless; you want a multi-frame batch for this to mean anything.
Two outputs:
- rev_image - the batch in reverse order.
- all_image - the original batch followed by the reversed one, i.e. a forward-then-backward sequence.
Wire all_image into a video combine / save node (something like VHS Video Combine) to render the ping-pong loop. Grab rev_image on its own if you just want the reversed clip without the forward half.
Installing it
Install the whole pack. ComfyUI Manager: Manager -> Custom Nodes Manager, search ComfyUI_Mira, Install, restart. Or clone:
cd ComfyUI/custom_nodes
git clone https://github.com/mirabarukaso/ComfyUI_Mira.git
Restart, and if a load error shows up run pip install -r requirements.txt inside the folder and restart again. Nothing to download.
Common issues
The one real gotcha is a frame-doubling artifact in the loop. Because all_image shares the boundary frames - the last frame of the forward pass sits right next to the first frame of the reverse pass, and both ends of the seam are duplicates - a boomerang can look like it "pauses" for a beat at the turnaround. If that bugs you, trim a frame at the join with a batch-slice node before combining. Whether it's even noticeable depends on your frame rate and how much motion is in those end frames.
Beyond that, it does exactly what it says and there's not much to break. It's part of ComfyUI_Mira, a grab-bag utility pack by mirabarukaso (better known for their WAI Character Select app) that exists, in the author's own words, to smooth over the small annoyances in their own workflow - this node is a textbook example of that. If you've ever built a ping-pong loop by hand with a reverse node and a concat node, this collapses both steps into one.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| rev_image | IMAGE | — |
| all_image | IMAGE | — |