Nodes/Difforum/Difforum · Ping-Pong Loop
ComfyUI Node

Difforum · Ping-Pong Loop

The guaranteed loop that reverses motion — and when that's fine

By chillithebillis·Created 3 months ago·Updated about a month ago· 7
Difforum · Ping-Pong Loop
  • frames
  • frames
enabledtrue

Ping-pong is the oldest trick for turning a clip into a loop: play it forward, then play it in reverse, and the end meets the beginning perfectly - because the motion literally undoes itself. Difforum Ping Pong is that, as a one-input node: hand it an IMAGE batch, and if enabled is on, it doubles your frames by appending the reversed sequence. Output is the same number type it came in with, just longer and loopable.

It's hard to overstate how trivial this is - and that's the appeal. One boolean, no parameters, no model. Feed it the frames from a Load Video or a feedback render, and the loop cannot fail, because frame N is the mirror of frame 1 by construction.

The honest trade-off

The catch is visible to anyone who watches for a second: motion reverses. A zoom-in becomes a zoom-out at the midpoint. For abstract psychedelic feedback that's often fine - even pleasant, like a breath. For any clip with directional motion (a car driving, a pan across a room), the reversal screams "loop" and pulls you out. That's the whole design space: Ping-Pong guarantees the loop but reverses the motion; Loop Blend keeps motion forward but needs optical flow and a little seam to manage.

So reach for Ping-Pong when you want a zero-effort, guaranteed loop and the content can take the reversals - mirrors, patterns, camera bounces, anything symmetric. The pack's own Save Video node even has a pingpong checkbox if you'd rather do it at write time than in the graph.

Inputs and install

Inputs: frames (IMAGE batch) and enabled (BOOLEAN, default true - set it false to pass the batch through untouched, which is handy for A/B comparison). Output: frames.

Install is the same one-liner as the rest of the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/chillithebillis/Difforum.git difforum

Restart ComfyUI - console prints [Difforum] loaded N nodes (ComfyUI Manager: search "Difforum"). Deps: numpy only, already in ComfyUI; the pack is Python 3.12+ clean.

The only "gotcha" worth naming: because the reversed half is a mirror, any text or asymmetric lighting in the source frames will visibly flip. If you see a scene's highlights swap sides mid-loop, that's not a bug - it's ping-pong being exactly what it says on the tin. And for the deepest irony of the pack: it's the cheap loop, and it's perfectly fine to use it anyway.

CategoryDifforum/effects

Inputs (2)

NameTypeDefaultDescription
framesIMAGE
enabledBOOLEANtrue

Outputs (1)

NameTypeDescription
framesIMAGE