Coordinates To String (mtb)
Pull one frame's tracked point out as text
- coordinates
- STRING
This is a small bridge node in MTB Nodes' mtb/coordinates category: it takes a batch of tracked coordinates and pulls out the value for one specific frame, formatted as a plain string. It exists because a lot of coordinate-producing nodes (tracking, per-frame detection) hand you a whole batch's worth of positions at once, but plenty of consumers downstream - text overlays, prompts that reference a location, some inpaint/region nodes that expect an "x,y" style string - only want a single point at a time.
What it does
Point it at a BATCH_COORDINATES input - a per-frame track of (x, y) positions, the kind of thing you'd get from a point-tracking or per-frame detection node - and give it a frame index. It returns the coordinate at that specific frame as a STRING. This is the same idea as Batch Shake's pos_x/pos_y outputs (per-frame FLOATS lists you can sample), just for a coordinate track instead of a shake curve, and formatted as text rather than a numeric list.
The inputs and output that matter
coordinates(BATCH_COORDINATES, required) - the tracked point data, one entry per frame.frame(INT, required) - which frame's coordinate to extract.
Output: a single STRING - the formatted coordinate for that frame. Wire it into a text field, a prompt-building node, or anything else that consumes plain text.
Installing it
ComfyUI Manager: search MTB Nodes, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/melMass/comfy_mtb
then restart ComfyUI. No models needed - this is a lookup-and-format step, not anything that runs inference.
Common issues
The most common way this trips people up is frame running past the length of the actual coordinate batch - if your tracked data covers 40 frames and you ask for frame 60, there's nothing there to return. Check the length of your BATCH_COORDINATES source before wiring in a fixed frame index, especially if you're driving frame from a counter that isn't clamped to the same range.
The other thing worth knowing: this node only reads one frame at a time. If you're trying to drive something per-frame across a whole batch rather than pull a single value, you want the coordinate track itself (or a FLOATS-based node like Batch Float / Batch Shake) feeding that downstream node directly, not this one looped manually.
And the standing pack-wide behavior: MTB logs [comfy_mtb] Some nodes (N) could not be loaded at startup rather than crashing when one node can't import, with a pointer to http://127.0.0.1:8188/mtb for the real reason - a real, confirmed pattern from other users' install logs. If this node is missing after install, check that line first.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| coordinates | BATCH_COORDINATES | — | |
| frame | INT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |