Nodes/comfyui-panels/Polygon To Resized Mask
ComfyUI Node

Polygon To Resized Mask

A ComfyUI node in Bmad/Panels with 4 inputs and 4 outputs.

By bmad4ever·Created 11 months ago·Updated 2 months ago· 38
Polygon To Resized Mask
  • polygon
  • image
  • mask
  • bbox
  • image
  • scale
approx_res1048576
pad64
CategoryBmad/Panels

Inputs (4)

NameTypeDefaultDescription
polygonPOLYGON
approx_resCOMBO10485763 options: 262144, 1048576, 1638400
padCOMBO644 options: 16, 32, 64, 128
imageoptIMAGEOptional 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)

NameTypeDescription
maskMASKMask resized and padded.
bboxBBOXThe returned mask bounds ignoring the padding.
imageIMAGEIf an image is provided, returns a resized padded crop of the image; otherwise returns None.
scaleFLOATThe scale applied to the polygon in order to obtain the mask at the target resolution.