Frame Repeater π
The frame-loop maker (ping-pong included)
- source_video
- repeated_video
FrameRepeater grabs a batch of frames from a video and repeats it - a few times, a lot of times, forward-only or ping-pong style, either as a standalone loop or spliced back into the original clip. It's the node behind three classic video jobs: a seamless looping background, an emphasis effect where a key moment repeats for a beat, and a ping-pong (AβBβBβA) loop for loopable wallpapers or attention-grabbing inserts.
How it works
You pick the frames with start_frame and frame_count, decide how many copies with repeat_times, and then choose what comes out with output_mode:
extract_only(default) - returns just the repeated frames as a fresh sequence. Nothing else. This is the mode for making a loop you'll use elsewhere, and it's cheaper because it skips re-stitching the source.insert_into_video- splices the repeated frames back into the full source video atinsert_position(-1 = end, 0 = beginning, or any index), so you get the whole video back with the repetition embedded.
Two features make it worth reaching for over a manual batch-tile. First, negative indexing: start_frame counts from the end when negative, so start_frame = -20 means "start 20 frames from the end" - no mental math on clip lengths. Second, reverse_repeat flips every second copy, giving you the ping-pong AβBβBβA shape that loops seamlessly because the end frame matches the start. Pair it with blend_frames (0β50) and it will crossfade the boundaries of the repeated block so the loop doesn't pop.
Mechanically it's the pack's usual story: slice, torch.cat, and (in insert mode) splice at insert_position with optional alpha blends at the joins, all on [B, H, W, C] IMAGE tensors where the batch dim is time. memory_efficient (default on) chunks the processing for long sequences.
The inputs that matter
start_frameandframe_count- the batch you're repeating. Remember negatives count from the end.repeat_times- how many copies. Keep an eye on output length: it's multiplied.output_mode- the big one.extract_onlyif you want the loop by itself;insert_into_videoif you want it back inside the source.reverse_repeat- the ping-pong switch. Default off.
The width/height/interpolation/method/condition cluster is the shared advanced-resize system - and yes, the same gotcha as the rest of the pack: defaults are 512Γ512 with condition: always, so set your real resolution and condition: if different or you'll get an unexpected downscale. Output is repeated_video.
Where it shines
The classic workflow is the seamless loop: grab a short segment, reverse_repeat on, a few blend_frames, extract_only mode, and you have a loopable clip for a background or a loading animation. The other common one is emphasis - repeat a key action three times inside the full video so the viewer actually sees it. In both cases the README's advice holds: clip first, repeat, and extend last, so you're not processing more frames than you have to.
Installing
Manager: search "ComfyUI-FrameUtilitys". Or:
cd ComfyUI/custom_nodes
git clone https://github.com/lum3on/ComfyUI-FrameUtilitys
Restart. No models, no extra pip dependencies - the pack's requirements.txt is comments only.
Troubleshooting
- "Invalid start_frame for repetition" -
start_frame+frame_countran past the video length. The pack's own guidance: verify the batch fits, and use negatives to count from the end. - Output is enormous -
repeat_timesmultiplies fast. Start small. - Loop visibly jumps - turn on
reverse_repeatfor a seamless ping-pong, or add a fewblend_framesto smooth the boundary.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| source_video | IMAGE | Source video sequence to process (IMAGE tensor format) | |
| start_frame | INT | -15-10000β10000 | Starting frame for repetition (negative values count from end) |
| frame_count | INT | 151β1000 | Number of frames to repeat |
| repeat_times | INT | 21β100 | How many times to repeat the frame batch |
| output_mode | COMBO | extract_only | Extract only the repeated frames or insert them into the full video |
| insert_position | INT | -1-1β10000 | Where to insert repeated frames (-1 = end, 0 = beginning) [only for insert_into_video mode] |
| width | INT | 51264β8192 | Target width for frame resizing |
| height | INT | 51264β8192 | Target height for frame resizing |
| interpolation | COMBO | bilinear | Interpolation method for resizing |
| method | COMBO | keep proportion | Resizing method |
| condition | COMBO | always | When to apply resizing |
| multiple_of | INT | 00β512 | Round dimensions to multiple of this value (0 = disabled) |
| blend_framesopt | INT | 00β50 | Number of transition frames for smooth blending |
| reverse_repeatopt | BOOLEAN | false | Reverse the repeated frames for ping-pong effect |
| memory_efficientopt | BOOLEAN | true | Process in chunks to save memory |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| repeated_video | IMAGE | β |