Append Reversed Frames
Make a seamless ping-pong loop from any clip
- images
- IMAGE
This is the ping-pong loop node. You feed it a batch of frames, it reverses a copy and tacks it onto the end, and now your clip plays forward then backward - smoothly, with no hard cut at the loop point. It's the oldest trick in the book for turning a short generated animation into something that loops forever without a visible seam, and it's exactly one node here instead of a manual reverse-and-concatenate dance.
You'd use it on any short clip you want to loop: a subtle idle animation, a cinemagraph, a wiggling texture, the kind of thing you'd post as a GIF or webp. The forward-then-back motion is inherently seamless because the last frame flows straight into itself on the way back. It doesn't look like real looped motion - you can tell it's a ping-pong if you watch for it - but for ambient loops it's cheap, reliable, and honestly good enough most of the time.
How it works
Frames come in as an IMAGE batch (in ComfyUI, video is just a stack of image frames). The node makes a reversed copy of that stack and appends it, so a 16-frame clip becomes roughly 32 frames: 1→16 then 16→1. The two remove toggles exist to kill the tiny stutter you'd otherwise get from the duplicated frame at each turnaround - without them, the last forward frame and the first reversed frame are identical, and so are the two frames at the very seam of the loop, which reads as a momentary pause.
The inputs and outputs that matter
images- the incomingIMAGEbatch (your clip's frames). This is the thing being looped.remove_head- off by default. When on, drops the duplicated frame at the start of the reversed section so the forward-to-backward transition doesn't hitch.remove_tail- off by default. When on, drops the duplicated frame where the loop wraps back to the beginning, so the overall loop is clean when it repeats.
The output is a single IMAGE batch - the forward+reversed frames. Send it to whatever writes your video: a JNodes save node, VideoHelperSuite's combine, or straight into a preview.
How to install it
ComfyUI Manager, search JNodes, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/JaredTherriault/ComfyUI-JNodes
pip install -r ComfyUI-JNodes/requirements.txt
No model files - this is pure frame manipulation.
Common issues & troubleshooting
A little stutter at the turnaround. That's the duplicated frame. Turn on remove_head (and remove_tail for the wrap point) to drop the repeats and smooth both seams.
The loop looks obviously "bouncy." That's ping-pong doing what ping-pong does - motion literally runs backward on the return. It's great for ambient/idle loops and poor for anything with directional motion (someone walking becomes someone moonwalking). For true seamless loops you need a model or workflow that generates a genuinely cyclic clip; this node fakes it, cheaply.
Frame count doubled unexpectedly. Expected - appending the reverse roughly doubles your frame count, which also doubles playback length and file size. Account for that in your fps and duration downstream.
Memory on long clips. Reversing and appending holds two copies of the frame batch. On a big, high-resolution clip that's real VRAM/RAM pressure. Loop short clips; don't ping-pong a 300-frame sequence unless you've got the headroom.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| remove_head | BOOLEAN | false | — |
| remove_tail | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |