Nodes/ComfyUI-SmartImageTools/Smart Image Point
ComfyUI Node

Smart Image Point

Click points on your image; feed them to the graph

By slvslvslv·Created about a year ago·Updated 25 days ago· 2
Smart Image Point
  • image
  • first_point
  • points
points_data[{"x":0.5,"y":0.5}]

ComfyUI is great at many things; "click on the image to give it coordinates" is not one of them out of the box. Smart Image Point is the pack's answer to that: it shows you a live preview of your image inside the node and lets you place and drag points on it, then outputs those points as data your graph can consume. If you've ever wished you could just point at where the background starts, this is the node you're looking for.

How it works

This is one of the pack's interactive nodes - it ships a small JavaScript extension (in the pack's js/ folder, auto-loaded) that renders the image inside the node and turns your clicks and drags into a list of points. Those points are stored as JSON in a hidden points_data widget, so they travel with the workflow when you save it. Each time the node runs, it parses that JSON and emits two outputs:

  • first_point - a single POINT, the first one you placed.
  • points - the full POINT_SET of everything you placed.

Coordinates are normalized 0–1 relative to the image, which is what keeps them stable when the image resolution changes. The default is a single point dead-center [{"x":0.5,"y":0.5}], so even untouched it produces valid output.

What it feeds

The natural consumers live in this same pack. Wire points into SmartBackgroundRemove's start_points input and your clicks become flood-fill seeds for background removal. Wire it into SmartDrawPoints and the dots render back onto the image for verification. Because it's an output node, it also puts the preview in your browser history, so the clicks persist across sessions.

Installing it

Standard pack install:

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

Restart ComfyUI, or install "SmartImageTools" via ComfyUI Manager. The JS part matters - if you see the node but no clickable image preview, the front end didn't load; a hard refresh (or restarting ComfyUI) usually fixes it, since the extension is registered under /extensions/ComfyUI-SmartImageTools.

The one thing to know

Because it's an output/preview node, ComfyUI treats it as a graph endpoint - that's expected. And since the points live in the hidden widget, editing the raw JSON directly works if you're the type who likes hand-editing coordinates: it's just a list of {"x":..., "y":...} objects, normalized 0–1. The moment you understand that, this node stops being "a point placer" and becomes "a way to hand the graph a list of coordinates by literally pointing at the picture," which is worth a lot in a flood-fill workflow.

CategorySmartImageTools

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
points_dataSTRING[{"x":0.5,"y":0.5}]

Outputs (2)

NameTypeDescription
first_pointPOINT
pointsPOINT_SET