Nodes/ComfyUI Model Bending/Frame Ramp (Bending, Experimental)
ComfyUI Node

Frame Ramp (Bending, Experimental)

Make an effect grow, fade or pulse across the clip

By abuzreq·Created 2 years ago·Updated 11 days ago· 26
Frame Ramp (Bending, Experimental)
  • bending_module
  • BENDING_MODULE
◄w_start0.00►
◄w_end1.00►
◄curvelinear►

Temporal effects are the whole reason to bend a video model rather than a still one: the bend applies to every frame, so what used to be a static piece of damage becomes motion. But a uniform bend gives you a uniform result - the whole clip is rotated, the whole clip is blurred, start to finish.

Frame Ramp (Bending) is what you wrap around a module to make its strength vary over time: nothing at the start and full at the end, the reverse, or a pulse that peaks in the middle. It's a modifier, so it outputs a BENDING_MODULE and produces no image of its own.

How it works

Per frame, the wrapped module's output is blended by a weight:

out[f] = x[f] + w(f) * (bend(x[f]) − x[f])

with w interpolating from w_start on the first latent frame to w_end on the last, along the curve you pick. Weights can go negative or beyond 1 (the range is −4 to 4), which means you can invert a bend in one direction across the clip, or overshoot it. Frame count means latent frames - on WAN, one latent frame is four video frames, so an 81-frame clip is 21 latent frames and your ramp has 21 steps to work with, not 81. Coarser than it sounds, and mostly fine.

The curves: linear (constant rate), ease_in (slow start, accelerating - quadratic), ease_out (fast start, settling), smooth (cosine ease, the gentlest of the four), and triangle, which peaks in the middle frame and returns to the start value at the end. Triangle plus a positive w_end is your "pulse" and is the only curve where the direction of the ramp reverses mid-clip.

There's an important edge case: on a 4-D tensor there's only one frame, so the module falls back to w_start and the ramp does nothing. This node only means anything when the hook sees a 5-D video tensor, which in practice means feeding it through DiT Block Bending or Attention Map Bending on a video model, with spatial on so the tokens are laid on the (frames, height, width) grid.

Inputs and output

  • bending_module - the module being ramped. Any of them: rotate, scale, translate, blur, sharpen, flip.
  • w_start - default 0, range −4 to 4. Strength on the first frame; 0 = unbent.
  • w_end - default 1, range −4 to 4. Strength on the last frame.
  • curve - linear, ease_in, ease_out, smooth, triangle.

Output: BENDING_MODULE.

The defaults are a "fade the effect in over the clip" preset, which is the thing you'll want most often.

A working example from the pack

The shipped temporal-bending workflow does this: a Rotate module at 30°, wrapped in a Frame Ramp with w_start 0, w_end 1, curve smooth, fed into Attention Map Bending on cross_text, blocks 13-18, tokens: all, early steps 0-4. Read that as: the middle of the model's attention rotates progressively further over the clip's frames, during the first few denoising steps where layout is deciding, and not at all at frame 0. The clip starts normal and ends visibly turned.

That's the pattern. Wrap, ramp, gate the step window, keep the underlying magnitude sane.

Install

ComfyUI Manager → search "ComfyUI Model Bending", or:

cd ComfyUI/custom_nodes
git clone https://github.com/abuzreq/ComfyUI-Model-Bending
pip install -r ComfyUI-Model-Bending/requirements.txt

kornia and scikit-learn, then restart ComfyUI. The video workflows under workflows/video/ link their own WAN weights - nothing is downloaded by the install itself.

Where people get burned

  • Running a wrapped module through a still-image path. Four-dimensional tensor, single "frame", ramp collapses to w_start. If your ramp appears to do nothing, this is usually why.
  • Expecting frame-accurate timing. The ramp is per latent frame, so on WAN you get 4-frame granularity. A fade that starts at latent frame 5 starts at video frame 20.
  • triangle with a large w_end. The midpoint of a triangle curve reaches w_end, so w_end: 4 with w_start: 0 means a very strong mid-clip maximum and nothing at either end. That's a lot of rotation or blur in the centre of a short clip.
  • Ramping an effect that's already too strong. The ramp changes when, not how much. Dial the module first with the ramp at a flat w_start = w_end, then shape the curve.
  • Marked experimental. The author's own note is blunt: validated on tiny random-weight WAN models in the test suite, not on real WAN weights. Expect to be the one discovering how it behaves at 720p.
Categorymodel_bending/video (experimental)

Inputs (4)

NameTypeDefaultDescription
bending_moduleBENDING_MODULE—
w_startFLOAT0.00-4–4Strength on the first frame (0 = unbent, 1 = fully bent)
w_endFLOAT1.00-4–4Strength on the last frame
curveCOMBOlinear'triangle' peaks in the middle frame

Outputs (1)

NameTypeDescription
BENDING_MODULEBENDING_MODULE—