ComfyUI Node
CV Draw Text
Stamps a text label onto the image or mask (cv2.putText), with an optional contrasting halo so it stays readable on any background - print a pipeline's final result (a reading, a count, a score) into its debug image. Compose dynamic text with Basic data handling string nodes ('to STRING', 'zfill', 'concat'). Empty text passes the image through unchanged.
CV Draw Text
- source
- image
◄text►
◄x12.00►
◄y42.00►
◄font_scale1.20►
◄color(0, 255, 0)►
◄thickness2►
◄outlinetrue►
Categoryimage/CV/features
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| source | COMFY_MATCHTYPE_V3 | Image or mask to stamp the text onto (a copy is made). Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size. | |
| text | STRING | The label; convert to an input to feed a computed string. | |
| x | FLOAT | 12.00-1000000–1000000 | Left edge of the text baseline, in pixels. |
| y | FLOAT | 42.00-1000000–1000000 | Baseline height, in pixels (text sits above it). |
| font_scale | FLOAT | 1.200.1–64 | Font size multiplier (1.0 is the base Hershey size). |
| color | STRING | (0, 255, 0) | Color as a single value (broadcast to all channels) or BGR tuple, e.g. '255' or '(0, 255, 0)'. Shorter tuples are zero-padded; longer tuples are truncated. |
| thickness | INT | 21–64 | Stroke width of the glyphs in pixels. |
| outline | BOOLEAN | true | Draw a contrasting halo behind the text: black behind a light 'color', white behind a dark one. It follows the colour, so black text on a black background is lifted off it rather than disappearing into a black halo. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | COMFY_MATCHTYPE_V3 | Same format as the image input. |