Coordinate_fromImage
Click points on an image, get JSON coordinates back
- image
- ORIGINAL_IMAGE
- coordinates
This is the entry point to Apt_Preset's coordinate family: the node where you actually click on an image and get numbered points back out as data. Everything else in the ImgCoordinate group - combining points, extracting one by index, drawing markers back on - assumes you've already got a coordinates string from somewhere, and this is usually where it starts.
What it is and why you'd reach for it
ComfyUI-Apt_Preset (cardenluo) is a large utility pack, and its ImgCoordinate nodes form a self-contained little subsystem: they all pass point data around as a JSON string of {x, y, index} objects, normalized 0–1. Coordinate_fromImage is marked as an output node in its own schema, which lines up with what the default value implies - this is a node with a live preview/interaction surface, not a pure batch-processing step. The practical read: drop an image in, and the node's own preview lets you click points directly on it, dropping numbered markers as you go, instead of typing coordinates by hand into Coordinate_Generator.
Where this matters: anywhere you need to mark specific spots on an image as data rather than as a mask - feeding downstream point-based conditioning, cropping around a clicked location, labeling face/object positions for a captioning step, or just building a coordinate list interactively instead of guessing normalized fractions in your head.
How it works
You feed it an image. The points_data field is a STRING that defaults to a single centered point - [{"x":0.5,"y":0.5,"index":1}] - and represents whatever points are currently placed. If you don't interact with it at all, it passes that single default point through; click on the image preview and it builds the list live as you go, each point getting the next index number.
Inputs and outputs that matter
image(required) - the image you're marking points on.points_data(required, STRING) - the current point list as JSON. You can also hand-edit this directly if you already know the coordinates you want and don't feel like clicking.
Outputs: ORIGINAL_IMAGE passes the source image through unchanged, and coordinates is the same JSON string, ready to feed into Coordinate_MarkRender (to visualize what you picked), Coordinate_pointCombine (to merge with other point sets), or Coordinate_SplitIndex (to pull one specific point out as plain numbers).
Installing it
Through ComfyUI Manager: search ComfyUI-Apt_Preset, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git
Run install.bat on Windows to install dependencies; on Linux/Mac there's no bundled script, so install the pack's Python requirements yourself before restarting. No model downloads needed - this is UI interaction plus JSON, not inference.
Common issues
Because the whole ImgCoordinate family communicates through hand-editable JSON strings, the most common way this breaks isn't the node itself - it's malformed JSON further down the chain. If you edit points_data by hand and forget a comma or a closing bracket, downstream nodes reading coordinates will typically fail rather than silently recover, so validate your JSON before wiring it forward.
Separately, ComfyUI-Apt_Preset is a large pack with real dependency weight, and at least one user has reported it failing to import at ComfyUI startup entirely. If this node (or any Apt_Preset node) isn't showing up, check the console log on startup for an IMPORT FAILED line rather than assuming your workflow file is broken - it usually points at a missing pip package. And if the click-to-place preview doesn't render at all, that's consistent with the same root cause: the node's frontend JavaScript assets not loading because the backend import failed.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| points_data | STRING | [{"x":0.5,"y":0.5,"index":1}] | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| ORIGINAL_IMAGE | IMAGE | — |
| coordinates | STRING | — |