Nodes/ComfyUI-NKD-VFX-Tools/😺NKD Mask Scheduler
ComfyUI Node

😺NKD Mask Scheduler

Make a Mask Fade on a Curve, So Your Control Can Loosen

By Nekodificador·Created 6 months ago·Updated a day ago· 155
😺NKD Mask Scheduler
  • mask
  • mask
◄schedule—►
â—„width512â–º
â—„height512â–º
â—„value1.00â–º
â—„normalizetrueâ–º
â—„invertfalseâ–º

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 mask input unplugged and the node makes a solid mask of width×height (at value strength) 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 FLOAT list, 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.

Category😺NKD Nodes/Sampling

Inputs (7)

NameTypeDefaultDescription
scheduleFLOAT—
widthINT5121–8192Width of the generated mask (used when no 'mask' is plugged in).
heightINT5121–8192Height of the generated mask (used when no 'mask' is plugged in).
valueFLOAT1.000–1Base value of the generated solid mask before scheduling.
maskoptMASKOptional. If plugged in, this mask is scheduled instead of a generated solid one.
normalizeoptBOOLEANtrueDivide the schedule by its max so the peak maps to 100% (handles sigma magnitudes ≠ 1).
invertoptBOOLEANfalseFlip the schedule: 0 → 100% mask, 1 → 0% mask.

Outputs (1)

NameTypeDescription
maskMASK—