Visit ComfyUI Online for ready-to-use ComfyUI environment
Generate text masks for images with specified text, font, size, color, and alignment, supporting animations.
The CreateTextMask node is designed to generate a mask or a batch of masks with specified text, allowing you to create visually appealing text overlays for your images. This node is particularly useful for adding text-based annotations, labels, or artistic text elements to your projects. By specifying the text, font, size, color, and alignment, you can customize the appearance of the text to fit your creative vision. The node also supports creating animations by varying the rotation of the text across frames, making it a versatile tool for dynamic text effects.
This parameter specifies the center locations for the text within the frame. It is a required string input that determines where the text will be placed.
This parameter allows you to input the text that will be used to create the mask. It is a required string input with a default value of 'text' and supports multiline text.
This parameter sets the width of the frame in which the text will be placed. It is an integer input with a default value of 512, and it can range from a minimum of 16 to a maximum of 4096.
This parameter sets the height of the frame in which the text will be placed. It is an integer input with a default value of 512, and it can range from a minimum of 16 to a maximum of 4096.
This parameter allows you to select the font for the text from a list of available fonts in the kjnodes_fonts
folder. It is a required input.
This parameter sets the size of the font for the text. It is an integer input with a default value of 42.
This parameter determines the alignment of the text within the frame. It offers three options: 'left', 'center', and 'right', with a default value of 'center'.
This parameter sets the color of the text. It is a string input with a default value of 'white'.
This optional parameter allows you to scale the size of the text. It is a float input with a default value of [1.0] and requires forced input.
This output parameter provides the generated image with the text overlay. It is an image type output.
This output parameter provides the mask created from the text. It is a mask type output.
This output parameter provides the inverted version of the mask created from the text. It is a mask type output.
alignment
parameter is set to 'center' and adjust the coordinates
parameter to place the text in the desired location.size_multiplier
parameter to scale the text size dynamically, which can be useful for creating responsive text overlays that adapt to different frame sizes.kjnodes_fonts
folder to achieve various stylistic effects and enhance the visual appeal of your text overlays.kjnodes_fonts
folder.kjnodes_fonts
folder. You can add new fonts to this folder if needed.font_size
, coordinates
, or frame_width
and frame_height
parameters to ensure the text fits within the frame.text_color
parameter is not in a recognized color format.text_color
parameter.© Copyright 2024 RunComfy. All Rights Reserved.