Nodes/MKRShift_Nodes/Video Speed Ramp
ComfyUI Node

Video Speed Ramp

Speed ramp a clip with a JSON list of speed points — the music-video retime

By criskb·Created 7 months ago·Updated 5 months ago· 0
Video Speed Ramp
  • video
  • video
  • output_path
  • summary
ramp_points_json[{"frame":0,"speed":1.0},{"frame":60,"speed":0.6},{"frame":120,"speed":1.8}]
fallback_fps24.0
output_formatauto
filename_prefixMKR_speed_ramp
subfolder
overwritefalse

MKRVideoSpeedRamp changes a clip's speed over time - slow, then fast, then slow - the "speed ramp" you see in every action-movie and music-video cut. Instead of one fixed speed value, you give it a list of keyframes, and it interpolates the speed between them. It's the most "editing-app" feeling node in this pack, and it's the one most people reach for when a generated video's pacing is dead and they want to retime it without leaving ComfyUI.

The control is ramp_points_json, a list of objects, each {"frame": N, "speed": S} - frame being a source frame index, speed being a multiplier where 1.0 is normal, 0.6 is slower, 1.8 is faster. The default gives you the shape:

[{"frame":0,"speed":1.0},{"frame":60,"speed":0.6},{"frame":120,"speed":1.8}]

Start at normal speed, ease down to 0.6× by frame 60, ease up to 1.8× by frame 120, then hold. Speeds are clamped between 0.01 and 100, and the interpolation between keyframes is linear.

Mechanically it decodes all frames, computes per-frame speed, converts those speeds into time offsets, and then resamples the output at your fallback_fps - picking the frame that should be showing at each output time. That last part is the honest description you need: this is a retime, not a motion-interpolation. It drops and duplicates frames to change speed. Slow it to 0.3× and you will see the stutter. For silky slow-motion you want a real optical-flow interpolator; this node is for deterministic retiming where the pacing matters more than the fluidity.

The inputs that matter

  • ramp_points_json - the keyframes, as above. Get the JSON right; the node is forgiving (malformed input falls back to a normal-speed ramp) but a valid list with sensible frames does the thing.
  • video - any resolvable video input.
  • fallback_fps - the output frame rate, and the ruler used to place output frames.
  • output_format - note the quirk: if you ask for mp4/mov/webm and ffmpeg isn't installed, this node downgrades to gif rather than failing.
  • filename_prefix, subfolder, overwrite - standard.

Outputs: video (MKR_VIDEO payload), output_path, summary.

Install

Part of MKRShift Nodes - install the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes

or ComfyUI Manager → search MKRShift_Nodes → restart. Needs system ffmpeg for mp4/mov/webm (README calls it out); gif/webp work without it. No pip dependencies.

Where people get burned

Expecting optical-flow slow-mo and getting frame stutter is the big one - again, this is a retime. Second: keyframes are in source frame indices, not seconds, so a 24 fps clip means frame 60 is 2.5 seconds in; if you're used to typing seconds, do the multiplication. And a ramp that goes below ~0.5× on fast footage will look choppy fast - keep the slow section short, or use it where the shot can absorb it (a hold, a drift). Audio: not carried through, standard for this pack's frame-based nodes.

CategoryMKRShift Nodes/Media/Timeline

Inputs (7)

NameTypeDefaultDescription
video*
ramp_points_jsonSTRING[{"frame":0,"speed":1.0},{"frame":60,"speed":0.6},{"frame":120,"speed":1.8}]
fallback_fpsFLOAT24.01–240
output_formatCOMBOauto6 options: auto, gif, webp, mp4, mov, webm
filename_prefixSTRINGMKR_speed_ramp
subfolderSTRING
overwriteBOOLEANfalse

Outputs (3)

NameTypeDescription
videoMKR_VIDEO
output_pathSTRING
summarySTRING