Nodes/ComfyUI_HBH-image_overlay/HBH Image Interactive Picker
ComfyUI Node

HBH Image Interactive Picker

The name promises a canvas, the code remembers a dot

By wings6407·Created about a year ago·Updated about a year ago· 1
HBH Image Interactive Picker
  • image
  • image
  • x_coordinate
  • y_coordinate
  • coordinates_json
point_color
point_size10

Of the three HBH pickers, this is the one whose name oversells the hardest. "Interactive" conjures up dragging a marker around a canvas. Read the source and the word means something quieter: this node keeps the last point it picked in memory and redraws it on every run.

Here's the mechanism. It holds last_coordinates on the node instance, starting at the image center. Each execution clamps the remembered point to the image bounds, draws the marker (the same filled-circle routine the preview node uses), updates its stored position, and returns everything. Its IS_CHANGED returns NaN, which tells ComfyUI to re-run it every queue pass - that's why the marker keeps showing up even when nothing else in the graph changed.

The practical difference from HBH_ImageCoordinatePicker is twofold: this one draws the dot on its image output, and it remembers state across runs. That makes it more of a workflow-state holder than a pure function - which is exactly why it's awkward. There's no initial_x/initial_y input, so you can't type a starting point, and since the coordinates depend on what ran last rather than what you set, the output isn't reproducible from a saved workflow the way you'd want. If you want predictable, graph-controlled placement, the plain picker wins.

Inputs: image, point_color, point_size. Outputs: image (with the dot drawn), x_coordinate, y_coordinate, and coordinates_json - which holds x, y, width and height, but not color or size. Pipe it into HBH_ImageCoordinatePreview and the marker reverts to red at size 10, so if you want the drawn preview to match, pass color and size along separately.

Where you'd reach for it: honestly, rarely. The statefulness is the interesting bit, and the interesting bit is also the footgun - a node whose output changes based on execution history is surprising inside a graph. The mental model that makes it click is "stateful picker," not "interactive picker": reach for it when a later node should re-run against the same point, and for everything else use the coordinate picker plus the preview for determinism.

Install is the same as the rest of the pack. ComfyUI Manager, search ComfyUI_HBH-image_overlay. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/wings6407/ComfyUI_HBH-image_overlay

then restart ComfyUI. No requirements.txt, no models - just numpy, torch and Pillow, all already present.

Same pack-level caveats: solo dev, a single commit, zero community threads to lean on. And the README's standing advice applies here too - if you chain it into a bigger graph, run images through an RGB conversion node (like WAS Suite's Images to RGB) first.

Categoryimage/interactive

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
point_colorCOMBO5 options: red, blue, green, yellow, white
point_sizeINT101–50

Outputs (4)

NameTypeDescription
imageIMAGE
x_coordinateINT
y_coordinateINT
coordinates_jsonSTRING