Text Renderer ππ ‘π £π
Render Any Value as Text, With a Clean Mask
- any
- IMAGE
- MASK
Real-time ComfyUI is cool until you realize the audience can't tell what's happening. Is that effect at 40% or 90%? Text Renderer fixes that by taking any value in your graph and painting it onto a canvas as text. FPS numbers, denoise values, a counter, a prompt - anything that flows through ComfyUI can become an on-screen label, and it ships both the image and a text-shaped mask so you can composite it cleanly instead of pasting a black box over your stream.
The headline feature is the any input. It's a wildcard typed *, which in ComfyUI terms means it accepts literally any data type - floats, ints, strings, even tensors if you're feeling brave. Whatever you feed it gets stringified and drawn. That's the whole trick, and it's what makes the node genuinely useful: you can render a FLOAT out of a Float Control directly, no string-conversion detour.
Rendering is PIL under the hood, with a real font bundled in the pack (DejaVu Sans in fonts/dejavu-sans/), so it looks like actual typography rather than a 5Γ7 bitmap. You get font_color and background_color as names ("white", "black", "red"), x_offset/y_offset to nudge it, an align of left/center/right, and wrap_width for wrapping text at a pixel width (0 = no wrap). The mask output matches the text exactly, so compositing is a matter of using the mask as your alpha matte.
Inputs worth setting
- any - the value to display. This is the one that matters.
- width / height - canvas size, which should match your output frame.
- font_size - text size in pixels; 48 is the default and reads well.
- wrap_width - wrap long strings at this pixel width (0 disables wrapping).
Outputs: IMAGE (text on the background color) and MASK (text as white). If the rendered image ends up RGBA, the alpha channel multiplies into the mask automatically.
Install & troubleshooting
It's in ryanontheinside/ComfyUI_RealtimeNodes - ComfyUI Manager (search "Control Nodes") or:
cd ComfyUI/custom_nodes
git clone https://github.com/ryanontheinside/ComfyUI_RealtimeNodes
cd ComfyUI_RealtimeNodes
pip install -r requirements.txt
A few things to know. Color names come from PIL, so use "white", "black", "red" - hex strings won't parse. Text is vertically centered by default, so the y_offset is for fine-tuning, not positioning from the top. And the font file is looked up relative to the pack; if you moved or symlinked the install, the fallback is PIL's tiny default font, which looks bad - keep the pack in its normal spot. When paired with the control nodes in this pack, though, you've got a live telemetry readout for your stream with about two wires.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| any | * | β | |
| width | INT | 51264β16384 | β |
| height | INT | 51264β16384 | β |
| font_size | INT | 481β512 | β |
| font_color | STRING | white | β |
| background_color | STRING | black | β |
| x_offset | INT | 0-4096β4096 | β |
| y_offset | INT | 0-4096β4096 | β |
| align | COMBO | center | 3 options: left, center, right |
| wrap_width | INT | 00β16384 | Width to wrap text at (0 = no wrapping) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |
| MASK | MASK | β |