ComfyUI Node
BD Mask Batch Index
Extract one mask by 0-based index from a mask batch (N,H,W). Bridges SAM3 per_prompt_masks → single-mask inputs on BD_PackChannels, BD_RemoveBackground, etc. Negative indices count from the end.
BD Mask Batch Index
- masks
- mask
- info
◄index0►
◄invertfalse►
Category🧠BrainDead/Segmentation
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| masks | MASK | Mask batch (N,H,W) — e.g. per_prompt_masks from BD_SAM3MultiPrompt. | |
| index | INT | 0-64–64 | 0-based index of the mask to extract. Negative counts from end. Clamped to [0, N-1] if out of range. |
| invertopt | BOOLEAN | false | Invert the selected mask before output. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| mask | MASK | Single (1,H,W) mask at the selected index. |
| info | STRING | 'index/total' — e.g. '2/5' confirms which mask was selected. |