A set of nodes for ComfyUI that can composite layer and mask to achieve Photoshop like functionality.
The LayerUtility: SimpleTextImage
node is a component of the ComfyUI environment that allows users to generate an image from text input. The node is designed to convert textual content into a visual representation, rendering the text onto an image canvas using various customizable parameters such as font style, text alignment, and image dimensions.
The SimpleTextImage
node takes text input and transforms it into an image. It utilizes a variety of input parameters to control the appearance of the text, including its alignment, font, size, and color. The node supports string input for text and a list of selectable fonts, which are used to create an image that visually represents the text content.
The node requires several inputs to function correctly, each of which tailors the output image to the user's specifications:
Text: The text content to be rendered on the image. This input supports multiline text.
Font File: A selection from available font files to be used for rendering the text.
Align: Determines the alignment of the text on the image. Options include center
, left
, and right
.
Characters Per Line: Specifies how many characters can fit in a single line before text wraps.
Leading: The space between lines of text.
Font Size: The size of the font used to render the text.
Text Color: Defines the color of the text. Input is a string representing a hexadecimal color code.
Stroke Width: The thickness of the stroke applied around the text.
Stroke Color: The color of the stroke applied to the text, defined as a hexadecimal string.
X Offset: Horizontal offset of the text position on the image.
Y Offset: Vertical offset of the text position on the image.
Width and Height: Dimensions of the output image canvas.
Size As (optional): An input that allows for automatically setting the size based on another reference image.
The SimpleTextImage
node generates two primary outputs:
Image: The resulting image with the rendered text.
Mask: An accompanying mask of the image, useful for further processing or layering in workflows.
The SimpleTextImage
node can be integrated into ComfyUI workflows to visually represent text inputs for purposes such as UI prototyping, design mock-ups, or visual content creation. It is suitable for users who require text visualization in image formats within their workflow processes. These workflows can subsequently save the image, composite it with other elements, or apply further transformations using other nodes.
Text Customization: Offers comprehensive options to customize text appearance, including color, size, stroke, and alignment.
Font Variety: Users can choose from a list of available fonts, aiding in the creation of diverse text styles.
Dynamic Sizing: The optional Size As
parameter enables image dimensions to be automatically adjusted based on a reference, ensuring flexibility to match specific requirements.
Multi-line Text Support: The node effectively handles multiline text, automatically wrapping and positioning content.
Overall, the LayerUtility: SimpleTextImage
node is a versatile tool for generating text-based visuals within the ComfyUI environment, offering significant customization and integration capabilities for various applications.