The TextOverlay node allows users to overlay text on images. The node supports adjustments for font size, type, color, alignment, and position, making it versatile for various applications.
Originally inspired by the Text Overlay Plugin by mikkel, this node has been rebuilt and expanded to include additional features and improvements.
To use the TextOverlay node, ensure this repo is included in your ComfyUI custom_nodes directory.
custom_nodes directory in your ComfyUI installation.custom_nodes directory using the following command:git clone https://github.com/Munkyfoot/ComfyUI-TextOverlay
After installation, the TextOverlay node will be available in the ComfyUI interface under the image/text category. To use the node:
To use a custom font, ensure the font file is included in the fonts directory within this directory. Then, specify the font file name (e.g., arial.ttf) in the font parameter of the TextOverlay node. If using a system-installed font, you can specify the font name directly without the file path. If the font file is not found, the node will default to a system-installed font.
The TextOverlay node requires the following inputs:
image: The input image(s) to overlay text on.text: The text content to overlay.font_size: Size of the font.font: Name of the font file (e.g., arial.ttf).fill_color_hex: Hex code for the text color.stroke_color_hex: Hex code for the text stroke color.stroke_thickness: Thickness of the stroke.padding: Padding around the text.horizontal_alignment: Horizontal text alignment (left, center, right).vertical_alignment: Vertical text alignment (top, middle, bottom).x_shift, y_shift: Adjustments for text positioning.line_spacing: Spacing between lines of text.The node overlays the specified text according to the configured parameters and output the modified input image(s).