ComfyUI Node
kubakub regions to mask
Make a mask of chosen regions, e.g. all windows, to use with any effect or core node. The regions are picked with a selector in plan syntax: names with wildcards ('W_F1_*'), 'group:Windows', 'tag:front', comma = or, space = and, '!' = not. Lets any effect or core node work on regions, or feeds the director as a layer mask.
kubakub regions to mask
- regions
- mask
- names
- region_masks
◄select*►
◄grow_px0►
◄feather_px0►
◄invertfalse►
◄per_region_masksfalse►
Categorykubakub/2d/regions
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| regions | KUBA_REGIONS | From any kubakub regions node (e.g. regions from masks). | |
| select | STRING | * | Plan selector, e.g. 'group:Windows, W_F0_*' or 'tag:underside'. |
| grow_px | INT | 0-256–256 | Grow (> 0) or shrink (< 0) the mask. |
| feather_px | INT | 00–256 | Soft edge: blurs the edge both ways, inwards and outwards, over about this many pixels in total. |
| invert | BOOLEAN | false | On: the mask covers everything except the selected regions. |
| per_region_masksopt | BOOLEAN | false | On: region_masks gives one mask per selected region. Takes regions x width x height x 4 bytes of RAM (100 regions at 3840x2160 = 3.3 GB), so it is off until you need it. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| mask | MASK | 1 on the selected regions (after grow, feather, invert). |
| names | STRING | The matching region names. |
| region_masks | MASK | One mask per selected region (batch), in the order of names, before grow, feather and invert. Needs per_region_masks on. Above 4 GB of RAM the node stops and asks for a narrower select. |