Nodes/ComfyUI-Apt_Preset/Coordinate_MarkRender
ComfyUI Node

Coordinate_MarkRender

Drawing numbered markers back onto an image

By cardenluo·Created 2 years ago·Updated 17 days ago· 309
Coordinate_MarkRender
  • image
  • marked_image
coordinates[]
base_size32
bg_colorred
text_size24
text_colorwhite
fontQuakeLove-Regular.otf
border_colorwhite
border_width2
padding4

Once you've built a coordinates list with Coordinate_fromImage, Coordinate_Generator, Coordinate_fromMask, or combined a few together with Coordinate_pointCombine, you generally want to see it before you trust it in a downstream step. Coordinate_MarkRender is the sanity check - it burns numbered, styled markers onto the image at every point in your coordinates list so you can eyeball exactly what you picked.

What it is and why you'd reach for it

This is part of ComfyUI-Apt_Preset's ImgCoordinate family, the set of nodes that treat image points as portable JSON data rather than pixels. Every other node in the family either produces or consumes that coordinate string; MarkRender is the one that visualizes it. It's the debugging step - did that click land where you meant it to, did the mask-derived point land on the right blob, does the combined point set from five separate sources actually look right - and it's also useful for producing annotated reference output on its own, not just as a debug tool.

How it works

Give it an image and a coordinates JSON string, and it draws a labeled box at each point: a colored background box (bg_color) sized by base_size, text at text_size in text_color, and an outline in border_color at border_width thickness with padding around the text. font picks from eight bundled decorative typefaces shipped with the pack - purely cosmetic, doesn't affect functionality, just how the numbers look.

Inputs and outputs that matter

  • image (required) - the image to draw on.
  • coordinates (required, STRING, default []) - the point list to render, from any of the other ImgCoordinate nodes.
  • base_size (8–256, default 32) - marker box size.
  • bg_color / text_color / border_color (enums, 8 color choices each) - the marker's styling.
  • text_size (8–128, default 24), font (enum of 8 bundled fonts), and optional border_width / padding round out the visual tuning.

Output: marked_image - your source image with every point in coordinates drawn on top as a numbered marker.

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 for dependencies; on Linux/Mac install the requirements yourself, since no equivalent script ships for those platforms. No external model downloads needed - the bundled fonts ship inside the pack itself, so there's nothing extra to fetch for this node.

Common issues

If marked_image comes back identical to your input with no markers at all, the first thing to check is that coordinates isn't still sitting at its empty-array default - a common mistake when you forget to wire the actual output from an upstream Coordinate node into this one. Second most common: malformed JSON upstream (a hand-edited points_data with a missing bracket) will typically break this node rather than silently render nothing, so if it errors outright, validate the JSON first.

If markers render in the wrong place entirely, remember every coordinate in this family is normalized 0–1 relative to image dimensions - if an upstream node handed you pixel values instead (easy to do if you're hand-typing into Coordinate_Generator), the markers will land far outside where you expect.

As with the rest of this pack: it's large and actively developed, and at least one user has reported an IMPORT FAILED error at ComfyUI startup after installing. Check the console log first if this node doesn't show up.

CategoryApt_Preset/image/ImgCoordinate

Inputs (10)

NameTypeDefaultDescription
imageIMAGE
coordinatesSTRING[]
base_sizeINT328–256
bg_colorCOMBOred8 options: black, white, red, green, blue, yellow, +2
text_sizeINT248–128
text_colorCOMBOwhite8 options: black, white, red, green, blue, yellow, +2
fontCOMBOQuakeLove-Regular.otf8 options: QuakeLove-Regular.otf, Autography.otf, Romellast.otf, FlowPerfect.ttf, en-LOLItalic.ttf, Alibaba-PuHuiTi-Heavy.ttf, +2
border_colorCOMBOwhite8 options: black, white, red, green, blue, yellow, +2
border_widthoptINT20–32
paddingoptINT40–32

Outputs (1)

NameTypeDescription
marked_imageIMAGE