ComfyUI Node
Polygon To Resized Mask
A ComfyUI node in Bmad/Panels with 4 inputs and 4 outputs.
Polygon To Resized Mask
- polygon
- image
- mask
- bbox
- image
- scale
◄approx_res1048576►
◄pad64►
CategoryBmad/Panels
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| polygon | POLYGON | — | |
| approx_res | COMBO | 1048576 | 3 options: 262144, 1048576, 1638400 |
| pad | COMBO | 64 | 4 options: 16, 32, 64, 128 |
| imageopt | IMAGE | Optional image to be cropped with respect to the pologon's bounds, then resized and padded similarly to the mask. Mainly for editing workflows. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| mask | MASK | Mask resized and padded. |
| bbox | BBOX | The returned mask bounds ignoring the padding. |
| image | IMAGE | If an image is provided, returns a resized padded crop of the image; otherwise returns None. |
| scale | FLOAT | The scale applied to the polygon in order to obtain the mask at the target resolution. |