Skip to main content

Grow Mask With Blur

KJNodes/masking
GrowMaskWithBlur

# GrowMaskWithBlur - mask: Input mask or mask batch - expand: Expand or contract mask or mask batch by a given amount - incremental_expandrate: increase expand rate by a given amount per frame - tapered_corners: use tapered corners - flip_input: flip input mask - blur_radius: value higher than 0 will blur the mask - lerp_alpha: alpha value for interpolation between frames - decay_factor: decay value for interpolation between frames - fill_holes: fill holes in the mask (slow)

Example

JSON Example
{
  "class_type": "GrowMaskWithBlur",
  "inputs": {
    "mask": [
      "node_id",
      0
    ],
    "expand": 0,
    "incremental_expandrate": 0,
    "tapered_corners": true,
    "flip_input": false,
    "blur_radius": 0,
    "lerp_alpha": 1,
    "decay_factor": 1
  }
}

This example shows required inputs only. Connection values like ["node_id", 0] should reference actual node IDs from your workflow.

Inputs

NameTypeStatusConstraintsDefault
maskMASKrequired--
expandINTrequiredmin: -16384, max: 16384, step: 10
incremental_expandrateFLOATrequiredmin: 0, max: 100, step: 0.10
tapered_cornersBOOLEANrequired-true
flip_inputBOOLEANrequired-false
blur_radiusFLOATrequiredmin: 0, max: 100, step: 0.10
lerp_alphaFLOATrequiredmin: 0, max: 1, step: 0.011
decay_factorFLOATrequiredmin: 0, max: 1, step: 0.011
fill_holesBOOLEANoptional-false

Outputs

IndexNameTypeIs ListConnection Reference
0maskMASKNo["{node_id}", 0]
1mask_invertedMASKNo["{node_id}", 1]
How to connect to these outputs

To connect another node's input to an output from this node, use the connection reference format:

["node_id", output_index]

Where node_id is the ID of this GrowMaskWithBlur node in your workflow, and output_index is the index from the table above.

Example

If this node has ID "5" in your workflow:

  • mask (MASK): ["5", 0]
  • mask_inverted (MASK): ["5", 1]
Was this page helpful?