Gift Mask Ramp · 遮罩渐变
A 0-to-1 temporal mask, built to feed crossfades
- images
- images
- mask
GiftMaskRamp generates the most boring-looking and most reusable thing in this whole suite: a temporal mask that ramps from 0 to 1 across a chosen frame range. Zero before the start frame, a linear ramp between start and end, held at 1 after. It doesn't look like much as an output - just a white shape getting brighter over frames - but it's the fundamental building block for every timed transition in sequence work, and it's what the other nodes in this pack quietly rely on.
What it does
Inputs: images (the sequence, passed through untouched), start_frame, and end_frame. Outputs: images and mask. The mask is a full-frame value per frame - not per-pixel - so it's a temporal ramp: frame-by-frame opacity that goes 0 → 1 across the range. Before start_frame it's 0 (transparent), between start and end it interpolates, and after end_frame it holds at 1 (opaque). Edge cases are handled rather than erroring: out-of-range frame values get clamped, and a zero-length range collapses to a step at the start frame.
Why you'd reach for it
The canonical use: drive a GiftMaskBlend crossover. Set the ramp's start_frame/end_frame to span the region where you want clip A to hand off to clip B, wire the ramp's mask into the blend's mask input, and the crossover timing is fully controlled by two integers. Same idea for fades, reveals, or any "appears over this window" effect - you get a mathematically exact envelope instead of eyeballing a gradient.
It's also the honest tool when GiftMaskFadeInOut's symmetric fade isn't what you want: the ramp gives you an asymmetric, precisely-windowed 0→1 that stays at 1 afterward, which is the "appear once and stay" behavior. If you're building a composite where a layer should pop in at frame 24 and stay, this is the node.
The migration angle
This is the replacement for MaskGradientNode from the old standalone mask-blend plugins. The suite renamed everything to collision-safe Gift* IDs so old and new can coexist during migration - swap MaskGradientNode → GiftMaskRamp in legacy JSON, verify it loads, then disable the old ComfyUI-mask-blend* folders, since the two legacy packs register duplicate generic IDs with each other.
Install: ComfyUI Manager (search "ComfyUI-GiftHelperSuite") or git clone https://github.com/lingziwyh/ComfyUI-GiftHelperSuite.git into custom_nodes, then restart ComfyUI. No pip dependencies, no models. As utility nodes go it's about as friction-free as it gets - and it's quietly the one that makes the rest of the sequence tools actually usable.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| start_frame | INT | 00–100000 | — |
| end_frame | INT | 100–100000 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| mask | MASK | — |