Batch Time Wrap (mtb)
Speed-ramp a rendered frame batch along a curve
- frames
- curve
- image
- interpolated_floats
This is the node that turns a constant-speed frame batch into something with actual pacing - a slow-motion hold at the start, a fast push through the middle, a settle at the end - without you having to re-render a single frame. It's time remapping, the same concept editors reach for in a video timeline, applied to a ComfyUI image batch.
How it works
You give it your rendered frames and a curve - a FLOATS list, exactly the kind of thing Batch Float or Curve To Float produce - describing how time should flow across the output. The node resamples your batch to target_count frames, but instead of just linearly spacing the resample points, it walks along the curve: where the curve moves slowly, output frames bunch up around the same input frames (a hold, or slow motion); where the curve moves quickly, it skips ahead faster through the input (a speed-up). Feed it a linear curve and you get an ordinary constant-speed resample; feed it an eased curve and you get a proper speed ramp.
The inputs and outputs that matter
frames(IMAGE, required) - the source batch to retime.curve(FLOATS, required) - the timing curve. This is the whole point of the node; without a deliberately-shaped curve here you're just resampling.target_count(default 25, min 2) - how many frames the output batch should have. This can be more or fewer than your input - Batch Time Wrap can stretch a short batch into a longer one (true slow-motion, interpolating between existing frames) or compress a long one down.
It returns two things: image, the retimed batch, and interpolated_floats - the actual per-output-frame values the curve resolved to after being stretched or compressed to target_count. That second output is handy if you need to drive something else (audio timing, a caption overlay) in sync with the same time-warp.
Installing it
ComfyUI Manager: search MTB Nodes, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/melMass/comfy_mtb
then restart. Pure tensor resampling - no model weights involved.
Common issues
The curve's range matters more than its shape at first glance - if your curve values don't span the range that maps cleanly across your input frame indices, you can end up holding on the first or last frame for longer than intended, or never reaching the tail end of your input batch at all. Preview interpolated_floats with a Debug node before trusting the image output blindly; it's the fastest way to confirm the remap is doing what you think it's doing.
Stretching a batch to a target_count much larger than your source frame count means most of the extra frames are interpolated rather than genuinely new content - fine for smoothing a speed ramp, less fine if you expected new detail to appear.
And the pack-wide behavior worth knowing regardless of which mtb node you're on: it logs [comfy_mtb] Some nodes (N) could not be loaded at startup instead of crashing, with a pointer to http://127.0.0.1:8188/mtb - confirmed in other users' real install logs. Check that line first if this node doesn't show up after installing.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| target_count | INT | 25 | — |
| frames | IMAGE | — | |
| curve | FLOATS | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| interpolated_floats | FLOATS | — |