Visit ComfyUI Online for ready-to-use ComfyUI environment
Enhance images with customizable text overlay for AI artists, offering styling options and optimal positioning.
The Text Overlay node is designed to enhance your images by adding customizable text directly onto them. This node is particularly useful for AI artists who want to annotate, brand, or creatively modify their images with text. It allows you to overlay text with various styling options, such as font type, size, color, and alignment, providing a high degree of flexibility and control over the final appearance. The node processes the input image and text, calculates the optimal positioning based on your specified parameters, and renders the text with optional stroke effects for added emphasis. This functionality is essential for creating visually appealing compositions, adding context or narrative to images, and ensuring that text elements are seamlessly integrated into the visual design.
The image
parameter is the input image on which the text will be overlaid. It serves as the canvas for the text overlay process, and the quality and dimensions of this image will directly affect the final output.
The text
parameter specifies the string of text you wish to overlay on the image. It supports multiline input, allowing you to add multiple lines of text. The default value is "Hello", and you can customize this to suit your needs.
The font_size
parameter determines the size of the text to be overlaid. It accepts integer values ranging from 1 to 256, with a default size of 32. Adjusting this parameter will affect the readability and prominence of the text on the image.
The font
parameter allows you to specify the font type for the text. The default font is "ariblk.ttf", but you can choose any available font to match your design preferences and ensure the text complements the image style.
The fill_color_hex
parameter defines the color of the text using a hexadecimal color code. The default color is white ("#FFFFFF"), but you can change it to any color that suits your design, ensuring the text stands out against the image background.
The stroke_color_hex
parameter sets the color of the text stroke, which is the outline around the text. The default stroke color is black ("#000000"). This feature is useful for enhancing text visibility, especially against complex backgrounds.
The stroke_thickness
parameter controls the thickness of the text stroke. It accepts float values from 0.0 to 1.0, with a default of 0.2. Adjusting this parameter can help make the text more legible and visually striking.
The padding
parameter specifies the amount of space around the text, measured in pixels. It ranges from 0 to 128, with a default value of 16. Padding helps position the text comfortably within the image, preventing it from being too close to the edges.
The horizontal_alignment
parameter determines the horizontal positioning of the text within the image. Options include "left", "center", and "right", with "center" as the default. This setting helps align the text according to your design requirements.
The image_tensor_out
parameter is the output image with the text overlay applied. It is returned as a tensor, which can be further processed or saved as needed. This output represents the final result of the text overlay operation, combining the original image with the specified text and styling.
fill_color_hex
to a contrasting color or increase the stroke_thickness
to make the text stand out.font_size
or increase the padding
to ensure the text fits within the image boundaries.© Copyright 2024 RunComfy. All Rights Reserved.