EA PingPong
Ping-pong a clip into a seamless loop in one node
- images
- images
- preview_strip
- frame_count
Video generators don't loop. A 3-second clip ends, and the jump back to frame one is a visible smack unless you do something about it. The oldest trick in the book is the ping-pong: play the clip forward, then play it backward, so the turnaround points are smooth by construction and the loop is seamless. EA PingPong is that trick in a single node - feed it a frame sequence, get back a loop-ready sequence.
It's also the natural partner to the pack's trim nodes: trim the dead frames first, then ping-pong, and you've got a loop that holds together at both ends.
How it works
It concatenates your frames with a mirrored tail. The one knob that matters most is dedupe_apex (default on): the turnaround frame is shared by the forward and reverse passes, so the node doesn't duplicate it - otherwise your apex would linger for two frames and read as a stutter. With it on, [A B C D] becomes [A B C D C B], which loops cleanly and at the correct length. If your source has a duplicated boundary frame already, flip it off.
Beyond that:
cycles(default 1) - how many times to repeat the finished loop. Leave it at 1 while tuning; bump it when you want a longer render from a short source.hold_first/hold_last- repeat the first or last frame N times before/after the ping-pong. Useful when your source clip's endpoints are abrupt and a short dwell reads better than an instant turn.preview_tiles(default 12) - emitspreview_strip, a horizontal strip sampling evenly across the final result so you can sanity-check the whole loop in one glance. Set to 0 to disable.
The outputs
images is your full ping-pong sequence (base plus mirrored tail, repeated per cycles) - wire it to a save node or the next stage. frame_count is the resulting length, which you'll want if a downstream node needs a frame budget. preview_strip is the optional one-image visual check.
Where it fits
Pair it with EA Auto Trim (PingPong) to shave the dead head/tail first, or use EA Trim Frames for a manual cut. The README frames the whole pack around WAN 2.2 video workflows, and this is the finishing step: generate a clip, trim it, ping-pong it, and your "looping video" requirement is met with three nodes instead of a hand-rolled frame-twiddle.
One honest note: ping-pong is a looping trick, not a true seamless loop - the turnaround is visible as a reversal if the clip has strong directional motion. For subtle or slow clips it's nearly invisible; for a car driving across frame, you'll see it bounce. That's physics, not a bug.
Install
Part of comfyui-ea-nodes: ComfyUI Manager → search comfyui-ea-nodes, or git clone https://github.com/ExoticArts/comfyui-ea-nodes into custom_nodes/, restart, hard-refresh. No extra Python dependencies.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| cyclesopt | INT | 11–100 | — |
| dedupe_apexopt | BOOLEAN | true | — |
| hold_firstopt | INT | 00–240 | — |
| hold_lastopt | INT | 00–240 | — |
| preview_tilesopt | INT | 120–64 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| preview_strip | IMAGE | — |
| frame_count | INT | — |