Difforum · Seamless Camera (loop)
A camera path that closes on itself, so your loop actually loops
- params
- audio
- camera
- cycle_frames
- info
Every loop trick in the book is a patch on the same problem: the end of your clip doesn't lead back into the start. Crossfades hide it, ping-pong reverses it - Difforum Seamless Camera attacks the root cause instead, by making the camera path itself periodic. If the camera returns to exactly where it started, with matching velocity, the last frame flows into the first with no dissolve needed.
It's a drop-in replacement for Difforum · Camera Shots (director) - same shot-list syntax:
0: orbit_right 1.0 0.8
60: spiral 1.2 1.0
The difference is what happens behind the scenes: the per-frame motion gets projected onto periodic components so the accumulated transform returns to identity, and the motion's velocity matches across the wrap. Zoom gets the same treatment in log space, so the product of all the zooms lands exactly at 1. No blending anywhere - the loop is genuine.
The inputs that matter
shots- yourframe: preset speed intensityshot list, same as Camera Shots.cycle_frames- the loop length (default 120). This becomes the period everything closes over.loop_mode-harmonic(the good default: FFT projection that also smooths the seam),zero_mean(just removes net drift, keeps every wiggle - use when your move is already smooth), oroff(disable closure).harmonics- how many periodic components to keep. Higher = more of your original move survives, but too high reintroduces the seam jitter; the node warns you if you're putting motion under ~2s per cycle.mode-2dor3d(3D needs a depth map downstream), andfovfor the 3D lens.audio(optional) - makes the closed path audio-reactive too.
Outputs: camera (the DIFFORUM_CAMERA to feed a Warp / Feedback Sampler), cycle_frames, and info - a report with the path closure error (0 = returns exactly to origin) and plain-spoken warnings about lap count and harmonics.
The two rules that make it work
Set Anim Setup's max_frames to a whole multiple of cycle_frames - the README's seamless template renders three laps, and the node will nag you in info if you don't. The extra laps exist so the image settles onto its cycle even though the camera already closed; then Loop Take keeps the settled lap. Also feed info through a text viewer: it tells you exactly what's wrong (tail padded, only one lap, harmonics too spicy) before you spend render time.
Install
One pack, standard steps:
cd ComfyUI/custom_nodes
git clone https://github.com/chillithebillis/Difforum.git difforum
Restart ComfyUI ([Difforum] loaded N nodes; ComfyUI Manager has it too). Deps: numpy only - already in ComfyUI, and the pack is Python 3.12+ clean. One environmental note from the README: on some SD1.5 fp16 builds you'll get all-black frames from NaN; launch with --force-fp32. Not Difforum's bug, but it's the kind of thing that looks like one.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| params | DIFFORUM_PARAMS | — | |
| shots | STRING | 0: orbit_right 1.0 0.8 60: spiral 1.2 1.0 | — |
| cycle_frames | INT | 1208–100000 | — |
| loop_mode | COMBO | harmonic | 3 options: harmonic, zero_mean, off |
| harmonics | INT | 31–16 | — |
| mode | COMBO | 2d | 2 options: 2d, 3d |
| fov | FLOAT | 401–170 | — |
| audioopt | DIFFORUM_AUDIO | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| camera | DIFFORUM_CAMERA | — |
| cycle_frames | INT | — |
| info | STRING | — |