Visit ComfyUI Online for ready-to-use ComfyUI environment
Overlay customizable text on images for enhanced visual impact.
The DrawText+ node is designed to allow you to overlay text onto images with a high degree of customization. This node is particularly useful for adding annotations, captions, or any textual information directly onto your visual content. It provides a range of options to control the appearance and positioning of the text, including font type, size, color, alignment, and shadow effects. By leveraging these capabilities, you can create visually appealing and contextually relevant text overlays that enhance the overall impact of your images. Whether you are creating digital art, designing graphics, or simply adding labels to your photos, DrawText+ offers the flexibility and control needed to achieve professional results.
This parameter specifies the text that you want to overlay on the image. It can include multiple lines separated by newline characters. The content of this text will be rendered onto the image based on the other styling and positioning parameters.
This parameter determines the font type used for the text. You can specify the path to a TrueType font file (.ttf) to customize the appearance of the text. The choice of font can significantly impact the readability and aesthetic of the text overlay.
This parameter sets the size of the font in points. It controls how large or small the text appears on the image. Adjusting the font size can help ensure that the text is appropriately scaled for the image dimensions and the intended use.
This parameter defines the color of the text. It accepts color names or hexadecimal color codes (e.g., #FFFFFF
for white). The text color should be chosen to contrast well with the background for better visibility.
This parameter sets the background color of the text area. It can be specified using color names or hexadecimal color codes. The background color can help make the text stand out, especially if the underlying image is complex or colorful.
This parameter specifies the distance of the shadow from the text. A non-zero value will create a shadow effect, adding depth and making the text more legible against various backgrounds. The distance is measured in pixels.
This parameter controls the blur radius of the shadow. A higher value results in a softer, more diffused shadow, while a lower value creates a sharper shadow. This can enhance the visual appeal and readability of the text.
This parameter sets the color of the shadow. It accepts color names or hexadecimal color codes. The shadow color should be chosen to complement the text color and background for a cohesive look.
This parameter determines the horizontal alignment of the text within the image. Options include "left", "center", and "right". Proper alignment ensures that the text is positioned correctly relative to the image's width.
This parameter specifies the vertical alignment of the text within the image. Options include "top", "center", and "bottom". Vertical alignment helps position the text appropriately relative to the image's height.
This parameter sets the horizontal offset of the text from its aligned position. It allows fine-tuning of the text's horizontal placement, measured in pixels.
This parameter sets the vertical offset of the text from its aligned position. It allows fine-tuning of the text's vertical placement, measured in pixels.
This optional parameter allows you to provide an existing image onto which the text will be overlaid. If not provided, a new image will be created based on the text dimensions and background color.
The output parameter mask
is a tensor representing the image with the overlaid text. This tensor can be used in further image processing pipelines or saved as an image file. The mask includes the alpha channel, which represents the transparency of the text and background.
img_composite
parameter is required but not provided.img_composite
parameter or ensure the parameter is optional in your use case.© Copyright 2024 RunComfy. All Rights Reserved.