Visit ComfyUI Online for ready-to-use ComfyUI environment
Overlay text onto images with customizable font, color, alignment, and positioning for AI artists and designers.
The ImageTextOverlay
node is designed to overlay text onto an image, providing a powerful tool for AI artists to add annotations, captions, or any textual information directly onto their visual creations. This node allows you to customize various aspects of the text overlay, including font size, color, alignment, and positioning, ensuring that the text fits perfectly within the specified area of the image. By dynamically adjusting the font size to fit the text within the given dimensions, the node ensures that the text is always legible and aesthetically pleasing. This functionality is particularly useful for creating book covers, posters, or any artwork that requires a combination of text and imagery.
This parameter represents the input image onto which the text will be overlaid. The image should be in a format that can be processed by the node, typically a tensor representation of the image.
The text to be overlaid on the image. This can be any string that you want to display on the image. The node will handle the wrapping and fitting of the text within the specified dimensions.
The width of the textbox area where the text will be placed. This parameter defines the horizontal space available for the text. The text will be wrapped to fit within this width. The value should be specified in pixels.
The height of the textbox area where the text will be placed. This parameter defines the vertical space available for the text. The text will be adjusted to fit within this height. The value should be specified in pixels.
The maximum font size to be used for the text. The node will start with this font size and decrease it if necessary to fit the text within the specified dimensions. The value should be specified in points.
The font to be used for the text. This should be the path to a TrueType font (.ttf) file. The font will be loaded and used to render the text.
The alignment of the text within the textbox. This can be "left", "right", or "center", determining how the text is aligned horizontally within the specified width.
The color of the text. This should be specified as an RGB tuple, such as (255, 255, 255) for white.
The x-coordinate of the starting point for the textbox. This defines the horizontal position of the top-left corner of the textbox within the image.
The y-coordinate of the starting point for the textbox. This defines the vertical position of the top-left corner of the textbox within the image.
The padding around the text within the textbox. This value defines the space between the text and the edges of the textbox, ensuring that the text does not touch the borders.
The height of each line of text. This parameter allows you to control the spacing between lines of text, ensuring that the text is readable and well-spaced.
The output image tensor with the text overlaid. This tensor represents the modified image with the text added according to the specified parameters. The output can be used for further processing or saved as a final image.
font
parameter is accessible and correctly formatted to avoid errors in loading the font.alignment
parameter to control the horizontal positioning of the text within the textbox, especially when dealing with varying text lengths.padding
and line_height
parameters to fine-tune the appearance of the text, ensuring it is well-spaced and does not touch the edges of the textbox.max_font_size
values to achieve the desired text size while ensuring it fits within the specified dimensions.textbox_width
and/or textbox_height
parameters, or reduce the amount of text to ensure it fits within the specified dimensions.© Copyright 2024 RunComfy. All Rights Reserved.