Nodes/ComfyUI-NegiTools/Point List to Mask πŸ§…
ComfyUI Node

Point List to Mask πŸ§…

Turn keypoint coordinates into round, paintable blobs

By natto-makiΒ·Created 3 years agoΒ·Updated 2 years agoΒ· 31
Point List to Mask πŸ§…
    • MASK
    β—„point_listβ–Ί
    β—„width512β–Ί
    β—„height512β–Ί
    β—„radius50β–Ί

    Masks are how you tell ComfyUI "change exactly this region and nothing else." Most masks are hand-painted or generated by segmentation models. This node makes masks out of points: you give it a JSON list of coordinates and it draws a circle around each one, then unions them into a single MASK. It's the second half of the pack's keypoint pipeline, and it only makes sense paired with the first half.

    How it works

    The point_list input expects JSON in the exact shape that the pack's OpenPoseToPointList node emits - a list of objects with x and y fields, where each value is normalized between 0.0 and 1.0. The node scales those coordinates by width and height (defaults 512Γ—512), draws a filled circle of radius pixels around each point, and sums them all up - overlapping circles just merge, and the output is clamped to 1.0. Result: one MASK the same size as the image you intend to use it on.

    So the classic setup is: OpenPoseToPointList with method set to hand β†’ PointListToMask with a sensible radius β†’ feed the MASK into an inpainting or masking pipeline. You get hand-shaped regions to regenerate without painting a thing. Set the method to face or all and the same chain gives you face blobs or joint blobs.

    Inputs and outputs

    • point_list - the JSON coordinate list (from OpenPoseToPointList, or hand-crafted - it's just [{"x": 0.5, "y": 0.5}]).
    • width, height - output mask dimensions, default 512Γ—512.
    • radius - circle radius in pixels, default 50.
    • Output: a single MASK.

    If the point list is empty, you get an all-black (all-zero) mask rather than an error, which is lenient but means "nothing selected" - a black mask does nothing downstream, so check your pose detection if you expected blobs and got nothing.

    Where you'd use it

    The obvious use is hands: ask for a hand mask, feed it to an inpaint or a detail-fix step, and regenerate just the hands - a favorite trick for fixing the classic mangled-fingers problem. With the face method it's a quick face-region mask for face-focused inpainting without a face-detection model. And because the format is so simple, you can feed it coordinates from anywhere - manually typed, computed by a script, or pulled from another model - as long as they're in the same normalized JSON shape.

    Installing it

    It's part of ComfyUI-NegiTools - ComfyUI Manager (search "ComfyUI-NegiTools") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/natto-maki/ComfyUI-NegiTools
    pip install -r ComfyUI-NegiTools/requirements.txt
    

    then restart. No API key, no model downloads - but the upstream OpenPoseToPointList node does fetch pose weights on its first run, so budget for that if you're using the pair.

    The honest take

    Circles are a crude approximation of anatomy - a hand blob isn't a hand-shaped region, so the mask bleeds onto background and neighboring body parts. For loose regional inpainting that's fine; for surgical fixes you'll want a finer mask (segmentation or a hand-drawn one). Treat this node as the "good enough, fast, no-painting" option in the mask toolbox. It's also a genuinely nice teaching tool for understanding how normalized coordinates and masks relate - wire OpenPoseToPointList β†’ PointListToMask β†’ a mask preview and watch the blobs appear.

    Categoryutils

    Inputs (4)

    NameTypeDefaultDescription
    point_listSTRINGβ€”
    widthINT5120–4096β€”
    heightINT5120–4096β€”
    radiusINT501–2048β€”

    Outputs (1)

    NameTypeDescription
    MASKMASKβ€”