Nodes/ComfyUI-FrameUtilitys/Frame Repeater πŸ”
ComfyUI Node

Frame Repeater πŸ”

The frame-loop maker (ping-pong included)

By lum3onΒ·Created about a year agoΒ·Updated 2 months agoΒ· 16
Frame Repeater πŸ”
  • source_video
  • repeated_video
β—„start_frame-15β–Ί
β—„frame_count15β–Ί
β—„repeat_times2β–Ί
β—„output_modeextract_onlyβ–Ί
β—„insert_position-1β–Ί
β—„width512β–Ί
β—„height512β–Ί
β—„interpolationbilinearβ–Ί
β—„methodkeep proportionβ–Ί
β—„conditionalwaysβ–Ί
β—„multiple_of0β–Ί
β—„blend_frames0β–Ί
β—„reverse_repeatfalseβ–Ί
β—„memory_efficienttrueβ–Ί

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 at insert_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_frame and frame_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_only if you want the loop by itself; insert_into_video if 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_count ran 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_times multiplies fast. Start small.
  • Loop visibly jumps - turn on reverse_repeat for a seamless ping-pong, or add a few blend_frames to smooth the boundary.
Categoryimage/video

Inputs (15)

NameTypeDefaultDescription
source_videoIMAGESource video sequence to process (IMAGE tensor format)
start_frameINT-15-10000–10000Starting frame for repetition (negative values count from end)
frame_countINT151–1000Number of frames to repeat
repeat_timesINT21–100How many times to repeat the frame batch
output_modeCOMBOextract_onlyExtract only the repeated frames or insert them into the full video
insert_positionINT-1-1–10000Where to insert repeated frames (-1 = end, 0 = beginning) [only for insert_into_video mode]
widthINT51264–8192Target width for frame resizing
heightINT51264–8192Target height for frame resizing
interpolationCOMBObilinearInterpolation method for resizing
methodCOMBOkeep proportionResizing method
conditionCOMBOalwaysWhen to apply resizing
multiple_ofINT00–512Round dimensions to multiple of this value (0 = disabled)
blend_framesoptINT00–50Number of transition frames for smooth blending
reverse_repeatoptBOOLEANfalseReverse the repeated frames for ping-pong effect
memory_efficientoptBOOLEANtrueProcess in chunks to save memory

Outputs (1)

NameTypeDescription
repeated_videoIMAGEβ€”