A ComfyUI custom node that converts masks into random coordinate points. Sample a specified number of random points from masks produced by segmentation models like SAM3, and output them as a JSON coordinate string...
Package profile
README
A ComfyUI custom node that converts masks into random coordinate points. Sample a specified number of random points from masks produced by segmentation models like SAM3, and output them as a JSON coordinate string compatible with SAM2 point prompts.
Nodes in this pack
1 nodeSources
1 sourceSource excerpts
1 excerptSource context: Repo zhiruizz/comfyui_mask2points
MaskToPoints
| 参数 | 类型 | 默认值 | 说明 | |------|------|--------|------| | mask | MASK | — | 输入遮罩 | | numpoints | INT | 3 | 采样点数量(110000) | | seed | INT | 0 | 随机种子,确保结果可复现 | | 输出 | 类型 | 说明 | |------|------|------| | pointsjson | STRING | JSON 格式坐标,如 [{"x": 240, "y": 750}, {"x": 540, "y": 700}] |
SAM3 · 1 input · 2 parameters · 1 output