To string (VEC2)
Turn 2D coordinates into text you can actually read
- value
- STRING
ComfyUI is full of nodes that produce numbers nobody ever sees. VEC2 values - 2D coordinates, offsets, positions - flow through camera-motion and region-style helpers and then vanish into a sampler. This node drags one out of the graph and turns it into text you can read, log, or stuff into a prompt.
The display name says it plainly: "To string (VEC2)". One vector in, one STRING out.
How it works
The input is value, a VEC2 - a two-component vector (x, y) that other custom nodes emit. The output is a single STRING, produced by Python's str() on the vector. The conversion is exactly that, nothing fancier.
Two practical details from the source:
- The input is
forceInput- you can't type a VEC2 into a widget. It has to be wired in from a node that produces one. If nothing's connected, the node has nothing to convert. - The string format is Python's repr of the vector, so expect something like
(123.4, 56.7)- parentheses, comma, space. It's the raw representation, not a pretty "x: 123.4, y: 56.7" label.
Why you'd want text out of a vector
The boring-but-real use is debugging: hang this off a motion or position node and route the output into a log/display node so you can see what coordinates your graph is actually computing. It's also useful for composing text - turning a pan direction into a readable label, folding coordinates into a filename, or building a prompt segment that describes where something should be. VEC2 is a niche type that only a few packs emit, so you won't reach for this daily - but when you're chasing a weird camera path, being able to read the numbers beats guessing.
Installing it
It's in RF Nodes (foxtrot-roger/comfyui-rf-nodes). ComfyUI Manager, search "RF Nodes", install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/foxtrot-roger/comfyui-rf-nodes
No dependencies, no model downloads - the pack is pure Python, and str() is about as dependency-free as a conversion gets.
Gotchas
- No wire, no value. Because the input is forceInput, this node is useless on its own in the graph - connect a real VEC2 source or it won't fire.
- Don't expect pretty formatting. It's
(x, y)in Python's voice, and there's no rounding or trimming. If you need clean labels, you'll be re-formatting downstream. - It converts a single vector to a single string - no lists, no arrays.
Small node, narrow job: make the invisible coordinates legible. When you need it, you'll know.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| value | VEC2 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |