Skip to main content

Batch CLIPSeg

KJNodes/masking
BatchCLIPSeg

Segments an image or batch of images using CLIPSeg.

Example

JSON Example
{
  "class_type": "BatchCLIPSeg",
  "inputs": {
    "images": [
      "node_id",
      0
    ],
    "text": "example text",
    "threshold": 0.5,
    "binary_mask": true,
    "combine_mask": false,
    "use_cuda": true
  }
}

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

Inputs

NameTypeStatusConstraintsDefault
imagesIMAGErequired--
textSTRINGrequired--
thresholdFLOATrequiredmin: 0, max: 10, step: 0.0010.5
binary_maskBOOLEANrequired-true
combine_maskBOOLEANrequired-false
use_cudaBOOLEANrequired-true
blur_sigmaFLOAToptionalmin: 0, max: 100, step: 0.10
opt_modelCLIPSEGMODELoptional--
prev_maskMASKoptional--
image_bg_levelFLOAToptionalmin: 0, max: 1, step: 0.010.5
invertBOOLEANoptional-false

Outputs

IndexNameTypeIs ListConnection Reference
0MaskMASKNo["{node_id}", 0]
1ImageIMAGENo["{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 BatchCLIPSeg 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]
  • Image (IMAGE): ["5", 1]
Was this page helpful?