ComfyUI Node

Batch Animation Processor

The node that turns a pile of frames into an actual animation

By lucasgattas·Created 11 months ago·Updated 7 months ago· 2
Batch Animation Processor
  • images
  • processed_frames
  • fps
frame_order
fps12
interpolation
interpolation_frames0
random_seed0

If the Advanced Batch Loader is the pack's front door, this is the living room. Batch Animation Processor takes a batch of frames and does the two things that make them move: reorders them and, optionally, smooths the transitions between them. It's the middle of the classic Load frames → process → encode pipeline this pack is built around.

The headline use case is making a seamless loop. Feed it a sequence of AI-generated images - a looping video still pass, a sprite rotation, a turn-around sheet - set frame_order to ping-pong and suddenly the dead end of your sequence stops being a problem. The node plays frames forward, then backwards through the middle, dropping the duplicated endpoints so the loop closes without a visible jump.

How it works

Two stages, in order. First the reorder: sequential, random (seeded), reverse, or ping-pong. Then interpolation, controlled by interpolation and interpolation_frames (how many new frames to synthesize between each original pair).

Here's the honest part, and it's the thing I'd want someone to tell me before I installed it: the pack's "AI-powered" interpolation is not what the shipped code does. The README sells RIFE and Google FILM, but in the actual source both apply_rife and apply_film are stubs with TODO comments - they log a message and fall back to the optical_flow method. Even the RIFE setup that auto-downloads a model file explicitly says "integration pending." So your real choices today are:

  • none - untouched frames.
  • crossfade - simple alpha blending. Fast, looks like a dissolve.
  • optical_flow - OpenCV's Farneback dense optical flow + warp + blend. This is the workhorse. It gives genuinely smoother motion than crossfade on camera pans and object movement, and it's classic computer vision, not a neural net.

Don't let that scare you off - optical flow is a perfectly good interpolation method, and it's what you'll actually be using. Just set expectations.

The inputs that matter

  • frame_order - ping-pong for seamless loops, reverse for that sweet slow-motion-bounce-back feel, random if you're making a chaotic collage.
  • fps - metadata for downstream encoding. 12 is a solid default for web GIFs; 24 if you want the film look.
  • interpolation + interpolation_frames - the trap here is the default: interpolation_frames defaults to 0, which means no interpolation happens no matter what method you pick. Set it to 1–3 to actually generate between frames. Beyond that you're just paying CPU time for marginal smoothness.
  • random_seed (optional) - for reproducible shuffles.

Outputs

  • processed_frames (IMAGE) - the reordered/interpolated sequence. Wire this into the pack's Multi-Format Animation Encoder, or any save/video node.
  • fps (INT) - echoes back what you set, so the encoder downstream can just grab it.

Install

Same story as the whole pack: ComfyUI Manager → search "Egregora Frames Animation" → install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/lucasgattas/ComfyUI-Egregora-Frames-Animation-Nodes.git
cd ComfyUI-Egregora-Frames-Animation-Nodes
pip install -r requirements.txt

Everything it needs (numpy, opencv-python, Pillow, torch) is in requirements.txt. No model downloads are mandatory.

Where people get burned

  • Expecting RIFE/FILM to work - they're placeholders; you're getting optical flow. That's fine, but know it before you build a workflow around "AI interpolation."
  • Interpolation looks like nothing happened - check interpolation_frames is above 0.
  • Slowness - interpolation runs in plain Python/numpy loops on CPU. A few hundred frames at high resolution with optical_flow will make you go make tea. Keep frame counts modest unless you're patient.
CategoryEgregora/animation

Inputs (6)

NameTypeDefaultDescription
imagesIMAGE
frame_orderCOMBO4 options: sequential, random, ping-pong, reverse
fpsINT121–60
interpolationCOMBO5 options: none, crossfade, optical_flow, rife, film
interpolation_framesINT00–10
random_seedoptINT00–18446744073709550000

Outputs (2)

NameTypeDescription
processed_framesIMAGE
fpsINT