Nodes/KJNodes for ComfyUI/Create Fade Mask
ComfyUI Node Runs on cloud

Create Fade Mask

Deprecated three-point fade — check Cross Fade Images first

By kijai·Created 3 years ago·Updated 5 days ago· 3,141
Create Fade Mask
    • MASK
    invertfalse
    frames2
    width256
    height256
    interpolation
    start_level1.00
    midpoint_level0.50
    end_level0.00
    midpoint_frame0

    Filed under KJNodes/deprecated, so treat it as legacy - but the mechanism is simple enough to explain in a couple of sentences, and there's a live sibling node worth checking first for new work. This one generates a MASK sequence that fades between three opacity levels over a set number of frames: it starts at start_level, moves toward midpoint_level at a chosen midpoint_frame, then continues on to end_level by the final frame, following one of four easing curves.

    The obvious use is a fade-in/fade-out mask for a video sequence, or a crossfade transition mask you feed into a separate compositing node alongside two clips.

    The inputs that matter

    • frames (default 2, min 2) - total frame count.
    • width / height (default 256 each) - output canvas size.
    • interpolation (linear / ease_in / ease_out / ease_in_out) - the easing curve between levels.
    • start_level (default 1), midpoint_level (default 0.5), end_level (default 0) - the three opacity anchor points, all 01.
    • midpoint_frame (default 0) - which frame the midpoint lands on.
    • invert (default false) - flips the whole result.

    Output: MASK.

    Worth checking first: Cross Fade Images

    This pack's CrossFadeImages node - current, not deprecated, living in KJNodes/image - covers very similar ground for the common case: it fades directly between two image batches, with a richer set of interpolation curves (eight options against this node's four). The difference is that CreateFadeMask only gives you the mask itself; you'd still need a separate compositing step to actually apply it to two clips. If what you actually want is "blend clip A into clip B," it's worth starting with CrossFadeImages and seeing if it covers your case before building a mask-plus-composite chain around this deprecated node.

    How to install it

    Via ComfyUI Manager: search KJNodes for ComfyUI, install, restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/kijai/ComfyUI-KJNodes
    pip install -r ComfyUI-KJNodes/requirements.txt
    

    Then restart. No models - pure procedural mask generation.

    Common issues & troubleshooting

    There's no real "hold" at the midpoint - it just jumps straight to fading toward end_level. midpoint_frame defaults to 0, which means the midpoint effectively lands at the very first frame, giving you a two-point fade in practice rather than the three-point fade the parameters suggest. Set midpoint_frame to wherever in the sequence you actually want the peak or valley to sit.

    Mixed up level values with frame counts. start_level/midpoint_level/end_level are 01 opacity-style values sitting right next to midpoint_frame, which is a frame index - easy to type a frame number into a level field or vice versa. Double check the ranges if your fade looks nothing like what you set.

    Fade looks too mechanical. Try a different interpolation curve before adjusting levels - ease_in_out in particular reads much more natural than linear for anything meant to feel like a smooth transition rather than a mechanical ramp.

    CategoryKJNodes/deprecated

    Inputs (9)

    NameTypeDefaultDescription
    invertBOOLEANfalse
    framesINT22–10000
    widthINT25616–4096
    heightINT25616–4096
    interpolationCOMBO4 options: linear, ease_in, ease_out, ease_in_out
    start_levelFLOAT1.000–1
    midpoint_levelFLOAT0.500–1
    end_levelFLOAT0.000–1
    midpoint_frameINT00–4096

    Outputs (1)

    NameTypeDescription
    MASKMASK