Skip to main content

ImageAndMaskPreview

KJNodes/maskingOutput Node
ImageAndMaskPreview

Preview an image or a mask, when both inputs are used composites the mask on top of the image. with pass_through on the preview is disabled and the composite is returned from the composite slot instead, this allows for the preview to be passed for video combine nodes for example.

Example

JSON Example
{
  "class_type": "ImageAndMaskPreview",
  "inputs": {
    "mask_opacity": 1,
    "mask_color": "255, 255, 255",
    "pass_through": false
  }
}

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

Inputs

NameTypeStatusConstraintsDefault
mask_opacityFLOATrequiredmin: 0, max: 1, step: 0.011
mask_colorSTRINGrequired-"255, 255, 255"
pass_throughBOOLEANrequired-false
imageIMAGEoptional--
maskMASKoptional--

Outputs

IndexNameTypeIs ListConnection Reference
0compositeIMAGENo["{node_id}", 0]
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 ImageAndMaskPreview node in your workflow, and output_index is the index from the table above.

Example

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

  • composite (IMAGE): ["5", 0]
Was this page helpful?