😺NKD Mask Scheduler
Make a Mask Fade on a Curve, So Your Control Can Loosen
- mask
- mask
Most of the time a mask in a sampler is one fixed weight for the whole run: you set it, it stays, done. Sometimes you want the opposite - control that arrives hard and lets go as the run progresses, or eases in then tightens. That's what NKD Mask Scheduler is for. It turns a single mask into a batch that fades over a list of values, one mask per value, so the mask's strength can follow whatever curve you drew.
How it works
The mechanism is nearly a one-liner: mask[i] = base × schedule[i]. Each value in the schedule scales the mask, so 1.0 gives the full mask and 0.0 gives an empty one. Feed it a curve and you get a whole batch of masks that ramp from full to empty (or whatever shape the curve has), which you then drive a per-step mask input with.
Two details make it friendlier than it sounds:
- Generative mode. Leave the
maskinput unplugged and the node makes a solid mask ofwidth×height(atvaluestrength) and schedules that. You don't need a Create Solid Mask node cluttering the graph just to fade a uniform region. - normalize (on by default) divides the schedule by its max, so the peak maps to 100%. That's specifically for schedule magnitudes that aren't already 0–1 - sigma curves, for instance, arrive in numbers that are anything but. Leave it on unless you know your curve is already normalized. invert flips the endpoints: 0 becomes the full mask, 1 the empty one.
The inputs that matter
- schedule - a
FLOATlist, one value per step or frame. The node was designed to pair with NKD Sigmas Curve's "floats" output (a curve going 1.0 → 0.0, say), but it accepts any float list - or a single float, if you just want one scaled mask. - width / height - only used when no mask is plugged in, for the generated solid.
- mask (optional) - plug one in and it schedules that instead of a generated solid.
- normalize / invert - the two behavior switches above.
The single output is mask: a MASK batch with one frame per schedule value. Wire it into whatever node in your sampling loop takes a per-step mask.
Install and gotchas
Installs with the rest of the pack: ComfyUI Manager, search "NKD VFX Tools", restart. No models. One documented quirk if you're hunting a bug: if you feed it a mask that's already a batch, it uses the first frame as the base - per-frame pairing is deliberately a separate node, not a feature here. This is a tiny, quiet utility, the kind of thing that saves you a hand-rolled batch of masks every single time you want a strength that changes over the run.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| schedule | FLOAT | — | |
| width | INT | 5121–8192 | Width of the generated mask (used when no 'mask' is plugged in). |
| height | INT | 5121–8192 | Height of the generated mask (used when no 'mask' is plugged in). |
| value | FLOAT | 1.000–1 | Base value of the generated solid mask before scheduling. |
| maskopt | MASK | Optional. If plugged in, this mask is scheduled instead of a generated solid one. | |
| normalizeopt | BOOLEAN | true | Divide the schedule by its max so the peak maps to 100% (handles sigma magnitudes ≠1). |
| invertopt | BOOLEAN | false | Flip the schedule: 0 → 100% mask, 1 → 0% mask. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mask | MASK | — |