ComfyUI Node

Smart Point Set

One point in a wrapper, because the flood fill wants a list

By slvslvslv·Created about a year ago·Updated 24 days ago· 2
Smart Point Set
  • point
  • POINT_SET

Smart Point Set does exactly one thing: it takes a single POINT and hands you back a POINT_SET containing just that point. That's the entire node. If that sounds redundant, you're not wrong - the value isn't in what it does, it's in the type it produces. This pack draws a hard line between "one coordinate" (POINT) and "a list of coordinates" (POINT_SET), and the nodes that actually do the interesting work on your image want the list.

Why the wrapper exists

Check the consumers in the pack and the pattern is obvious:

  • SmartBackgroundRemove accepts start_points (a POINT_SET) alongside the single start_point. When it gets a set, it flood-fills from every point in it - meaning you can click multiple background regions in one pass instead of running the node once per spot.
  • SmartDrawPoints takes only a POINT_SET. You can't draw one dot with it unless that dot is wrapped in a set.

So SmartPointSet is the bridge that turns your single coordinate into the thing those nodes will accept. It's the [point] list literal of this pack.

How it works

The mechanism is a one-liner in the source: create_point_set returns ([point],) - a list with the input point as its only element. No image processing, no math, no state. The POINT_SET you get is a fresh list, not a reference to anything, which matters once you start merging.

Input: point (POINT). Output: POINT_SET.

Where it plugs in

The realistic wiring is: SmartPoint → SmartPointSet → SmartBackgroundRemove. That's the "click one background region and delete it" workflow, and honestly for a single point you can skip the wrapper entirely - SmartBackgroundRemove also takes a bare start_point. The set version earns its keep when you intend to grow it with SmartPointSetMerge into a multi-point set, which is the workflow for removing a background that isn't one clean color.

The other route to a POINT_SET is SmartImagePoint, which lets you drag several dots onto an image preview and outputs both the first point and the full set. If you're doing interactive multi-click removal, that node is usually the better starting point than assembling sets by hand.

Installing it

Same pack as everything else - ComfyUI-SmartImageTools:

cd ComfyUI/custom_nodes/
git clone https://github.com/slvslvslv/ComfyUI-SmartImageTools
pip install -r ComfyUI-SmartImageTools/requirements.txt

Restart ComfyUI, or install via ComfyUI Manager by searching "ComfyUI-SmartImageTools". Note the real requirements.txt is heavier than the README suggests - scikit-learn, scikit-image, opencv-python, numba, numpy, Pillow - so the first post-install start can be slow while those install.

Gotchas

  • A single-point set is still a set. Feeding it to something expecting multiple points works fine - it just has one.
  • Don't overthink it. If you only ever need one click point, wire SmartPoint straight into SmartBackgroundRemove's start_point and skip this node.
  • POINT_SET and POINT are distinct socket types in this pack; they don't auto-convert, so you'll see a red port if you try to feed a set into a point slot.

Smart Point Set is pure plumbing - the kind of node you'd normally never think about twice. But it's the exact seam where the pack's point system goes from "I clicked a thing" to "I clicked a bunch of things," and that distinction is what makes the flood-fill remover actually useful.

CategorySmartImageTools

Inputs (1)

NameTypeDefaultDescription
pointPOINT

Outputs (1)

NameTypeDescription
POINT_SETPOINT_SET