Batch Crop From Mask Advanced
KJNodes/masking
BatchCropFromMaskAdvancedExample
JSON Example
{
"class_type": "BatchCropFromMaskAdvanced",
"inputs": {
"original_images": [
"node_id",
0
],
"masks": [
"node_id",
0
],
"crop_size_mult": 1,
"bbox_smooth_alpha": 0.5
}
}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 |
|---|---|---|---|---|
original_images | IMAGE | required | - | - |
masks | MASK | required | - | - |
crop_size_mult | FLOAT | required | min: 0, max: 10, step: 0.01 | 1 |
bbox_smooth_alpha | FLOAT | required | min: 0, max: 1, step: 0.01 | 0.5 |
Outputs
| Index | Name | Type | Is List | Connection Reference |
|---|---|---|---|---|
0 | original_images | IMAGE | No | ["{node_id}", 0] |
1 | cropped_images | IMAGE | No | ["{node_id}", 1] |
2 | cropped_masks | MASK | No | ["{node_id}", 2] |
3 | combined_crop_image | IMAGE | No | ["{node_id}", 3] |
4 | combined_crop_masks | MASK | No | ["{node_id}", 4] |
5 | bboxes | BBOX | No | ["{node_id}", 5] |
6 | combined_bounding_box | BBOX | No | ["{node_id}", 6] |
7 | bbox_width | INT | No | ["{node_id}", 7] |
8 | bbox_height | INT | No | ["{node_id}", 8] |
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 BatchCropFromMaskAdvanced node in your workflow, and output_index is the index from the table above.
Example
If this node has ID "5" in your workflow:
original_images (IMAGE):["5", 0]cropped_images (IMAGE):["5", 1]cropped_masks (MASK):["5", 2]
Was this page helpful?