ConfigurableDrawText
Burn a caption onto an image with a reusable text style
- TEXT_STYLE
- IMAGE
- IMAGE
Sometimes the final image needs words on it - a caption, a watermark, a label - and you'd rather not fire up a paint program for every output. ConfigurableDrawText renders text onto an image using a text style defined elsewhere in the graph. It's the "draw" half of the Flux Continuum pack's text-overlay duo; DrawTextConfig is the "configure" half, and the two are meant to be used together.
How it works
The node takes your text, an image, and a TEXT_STYLE object, and renders the text over the image using Pillow. It builds a transparent overlay canvas, draws each line with the configured font and color, composites on optional shadow and background, then alpha-composites the whole thing over your image and returns the result as an IMAGE.
Details worth knowing: multi-line text splits on newlines, the text box is positioned by the style's alignment and offsets, and a direction of "rtl" reverses each line (for right-to-left scripts). The node operates on the first image in a batch - the source processes IMAGE[0] - so if you feed a batch, you get text on the first frame and unchanged pixels for the rest. That's a gotcha if you batch captions.
Inputs and outputs
- TEXT -
STRING, multiline. The text to draw; newlines become line breaks. - TEXT_STYLE - the style object from DrawTextConfig (font, size, color, alignment, shadows, offsets).
- IMAGE - the image to render onto.
Output is one IMAGE, the composite result.
Installing it
Bundled with robertvoy/ComfyUI-Flux-Continuum:
cd ComfyUI/custom_nodes
git clone https://github.com/robertvoy/ComfyUI-Flux-Continuum
or ComfyUI Manager ("Flux Continuum"), restart. The pack ships two bundled fonts (Inter and ShareTechMono) in its fonts/ directory, so there's nothing to download - the font choice comes from DrawTextConfig's dropdown.
Troubleshooting
Text not showing? Check the style's color isn't #00000000 (transparent) - the default background is transparent black, and if you accidentally set the text color to something transparent, you get nothing. Text off-canvas? The alignment + offset math can push the text box outside the image; drop the offsets to 0 and pick center alignment to sanity-check. And remember: single-image processing means a batch of images only gets text on the first one. If you need per-image captions, you want a node that loops the batch.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| TEXT | STRING | — | |
| TEXT_STYLE | TEXT_STYLE | — | |
| IMAGE | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |