Nodes/ComfyUI-GiftHelperSuite/Video Time Remap (Speed Presets)
ComfyUI Node

Video Time Remap (Speed Presets)

AE-style time remap without the curve editor

By lingziwyh·Created 5 months ago·Updated 4 days ago· 7
Video Time Remap (Speed Presets)
  • images
  • images
target_seconds5.0
fps30
speed_presetease_in_out
intensity1.00
min_speed0.05
resample_modelinear

Video Time Remap (Speed Presets) is the node you reach for when a generated frame sequence has the right content but the wrong rhythm. It's a batch retimer: feed it a stack of frames, tell it how long the clip should be, and it re-times the animation so the whole thing lands exactly on your target duration - accelerating, slowing, or pulsing along the way.

The pitch is in the "(Speed Presets)" part. In After Effects you'd open the Time Remap curve editor and hand-draw a velocity envelope. This node skips the editor entirely: you pick a named curve like ease_in_out or double_burst, set a target duration, and go. For a 5-10 second AIGC gift animation where you're matching a beat or squeezing a loop down to fit a slot, that trade - presets instead of fiddly keyframes - is the whole point.

How it works

The mechanism is a proper speed-based time remap, not just a resize of the frame count. It works out the output length as round(target_seconds × fps) frames, then for every output frame it evaluates the chosen speed curve at that point in time, integrates the speeds into a time-map, and resamples from your input frames. Two guarantees fall out of the integration, and they matter more than you'd think:

  • First output frame = first input frame. No drifting start.
  • Last output frame = last input frame. So loops close cleanly - important when the last frame has to meet the first.

Resampling is frame selection, not synthesis: linear blends between the two nearest input frames (smooth, but fast motion can ghost), nearest picks one hard (stutter, no blur). It will not invent frames. If you're after true slow-mo with new in-between frames, you want a frame-interpolation node (RIFE and friends), not this.

The inputs that matter

  • speed_preset - 12 curves: linear, ease_in, ease_out, ease_in_out, ramp_up, ramp_down, hold_then_burst, burst_then_hold, double_burst, pulse, slow_mid, fast_mid. The names are honest. ease_in_out is the default and the safest place to start; pulse gives rhythmic hits that line up nicely with a 4-beat measure.
  • target_seconds + fps - together they decide how many frames come out. fps isn't metadata on the video, it's your output sampling rate. Want the same length as the input? Set target_seconds = input_frames / fps.
  • intensity - blends between a flat linear retime (0) and the full preset (1), and up to 2.5 if you want to exaggerate the curve. It's the "how much of this motion do I actually want" dial.
  • min_speed - a floor on playback speed. The curves dip toward zero at their slow points; this stops them from stalling into a freeze-frame you didn't ask for.
  • resample_mode - linear (default) or nearest, as above.

Wiring it in

Output is images, an IMAGE batch - straight into a VHS Video Combine / save-sequence node, or into another frame processor. It lives in video/time in the node menu.

Install

The pack this ships in, ComfyUI-GiftHelperSuite, is pure PyTorch: no requirements.txt, no models to download, no extra Python deps beyond what ComfyUI already has. ComfyUI Manager: search ComfyUI-GiftHelperSuite and install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/lingziwyh/ComfyUI-GiftHelperSuite

Then restart ComfyUI. That's the whole install.

Gotchas

The output batch length changes - that's the feature, but it means downstream nodes that assumed the original frame count (audio sync, per-frame prompts) will be off. Also worth knowing: the author's own README asks for consistent-resolution sequences and a restart after updates, and warns that if you ever ran the old standalone ComfyUI_Unmult_AE pack you should remove it to avoid duplicate node registration. None of that is specific to this node, but it's the kind of thing that bites on a fresh install.

Categoryvideo/time

Inputs (7)

NameTypeDefaultDescription
imagesIMAGE
target_secondsFLOAT5.00.1–120
fpsFLOAT301–240
speed_presetCOMBOease_in_out12 options: linear, ease_in, ease_out, ease_in_out, ramp_up, ramp_down, +6
intensityFLOAT1.000–2.5
min_speedFLOAT0.050.001–2
resample_modeCOMBOlinear2 options: linear, nearest

Outputs (1)

NameTypeDescription
imagesIMAGE