LayerStyle

2167
By chflame
Updated 15 days ago
View on GitHub →See Common Issues →

A set of nodes for ComfyUI that can composite layer and mask to achieve Photoshop like functionality.

Available Nodes

LayerUtility: TextImage V2

Documentation for LayerUtility: TextImage V2 Node

Overview

The LayerUtility: TextImage V2 node in ComfyUI is designed to create rich, stylized text images based on user-defined parameters. This node allows users to generate images where text is rendered over a customizable background. It offers a variety of options to customize the appearance and layout of the text, making it a versatile tool for design and artistic projects within ComfyUI workflows.

Inputs

The LayerUtility: TextImage V2 node accepts the following inputs:

  • Text: The text string to be rendered. This can include multiple lines if the multiline option is enabled.
  • Font File: Selects the font for the text. Usable fonts are determined by available resources.
  • Spacing: Adjusts the space between characters.
  • Leading: Adjusts the space between lines of text.
  • Horizontal Border: Controls the horizontal margin, as a percentage, between the text and the edge of the image.
  • Vertical Border: Adjusts the vertical margin, as a percentage, between the text and the top of the image.
  • Scale: Determines the size of the text relative to the image dimensions.
  • Variation Range: Defines the range of random variation in text size and position, adding a dynamic or artistic effect.
  • Variation Seed: Sets the seed for randomized variations to ensure consistent results across multiple executions.
  • Layout: Chooses the text layout as either horizontal or vertical.
  • Width: The width of the output image.
  • Height: The height of the output image.
  • Text Color: Sets the color of the text using a hex code.
  • Background Color: Sets the color of the background using a hex code.

Optional Inputs:

  • Size As: Takes another input for size reference and adjusts the output image's dimensions accordingly.

Outputs

The LayerUtility: TextImage V2 node produces two outputs:

  • Image: The final image with the specified text rendered onto the background.
  • Mask: A mask of the text area within the image. This can be used for further manipulations or layering within a project.

Usage in ComfyUI Workflows

Within ComfyUI workflows, the LayerUtility: TextImage V2 node can be used wherever there is a need to create customized text images. This is particularly useful in scenarios requiring dynamic graphic layouts, title pages, or any instance where visual text presentation is crucial.

The node can be combined with other nodes to further process the image or integrate it into a larger composition. Its ability to randomize certain properties makes it ideal for creating visually engaging content that requires a degree of uniqueness or artistic flair.

Special Features or Considerations

  • Randomization: The variation range and seed inputs provide a powerful way to introduce variability into your text renderings, allowing you to create unique designs with minimal effort.
  • Layout Choices: The node offers both horizontal and vertical text layouts, giving more flexibility in how text is presented visually.
  • Fine Control: Inputs like spacing, leading, and scale allow precise control over text appearance, supporting the creation of professional-grade typographic compositions.

This node facilitates the creation of complex text images without requiring in-depth knowledge of graphic design, making it accessible for users of all skill levels. As there is no README in the repository, further examples or usage patterns may need to be explored by practical experimentation or through community resources related to ComfyUI and its usage.