Batch CLIPSeg
KJNodes/masking
BatchCLIPSegSegments 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
| Name | Type | Status | Constraints | Default |
|---|---|---|---|---|
images | IMAGE | required | - | - |
text | STRING | required | - | - |
threshold | FLOAT | required | min: 0, max: 10, step: 0.001 | 0.5 |
binary_mask | BOOLEAN | required | - | true |
combine_mask | BOOLEAN | required | - | false |
use_cuda | BOOLEAN | required | - | true |
blur_sigma | FLOAT | optional | min: 0, max: 100, step: 0.1 | 0 |
opt_model | CLIPSEGMODEL | optional | - | - |
prev_mask | MASK | optional | - | - |
image_bg_level | FLOAT | optional | min: 0, max: 1, step: 0.01 | 0.5 |
invert | BOOLEAN | optional | - | false |
Outputs
| Index | Name | Type | Is List | Connection Reference |
|---|---|---|---|---|
0 | Mask | MASK | No | ["{node_id}", 0] |
1 | Image | IMAGE | No | ["{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?