ComfyUI > Nodes > Allor Plugin > ImageText

ComfyUI Node: ImageText

Class Name

ImageText

Category
image/draw
Author
Nourepide (Account age: 2900days)
Extension
Allor Plugin
Latest Updated
2024-05-22
Github Stars
0.2K

How to Install Allor Plugin

Install this extension via the ComfyUI Manager by searching for Allor Plugin
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Allor Plugin in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

ImageText Description

Draw text onto images with customizable options, multiple styles, colors, and alignment, including text outlines for emphasis.

ImageText:

The ImageText node is designed to allow you to draw text onto an image with various customizable options. This node is particularly useful for adding annotations, captions, or any textual information directly onto your images. It supports multiple lines of text, different font styles, sizes, colors, and even text alignment. Additionally, you can add an outline to your text to make it stand out more prominently. This node is essential for AI artists who want to enhance their images with textual elements, providing a high degree of flexibility and control over the appearance of the text.

ImageText Input Parameters:

text

This parameter specifies the text string that you want to draw on the image. It can include multiple lines separated by newline characters (\n). The content of this parameter directly affects what will be displayed on the image.

font

This parameter determines the font style of the text. You need to provide the name of the font file located in the fonts directory. The choice of font can significantly impact the visual appeal of the text.

align

This parameter sets the alignment of the text. It can be set to values like left, center, or right, determining how the text is aligned within its bounding box. Proper alignment is crucial for ensuring that the text appears as intended, especially when dealing with multiline text.

size

This parameter defines the size of the font in points. It affects the overall readability and prominence of the text on the image. The size should be chosen based on the resolution of the image and the amount of text to be displayed.

red

This parameter sets the red component of the text color. It accepts values from 0 to 255, where 0 is no red and 255 is full red. Adjusting this value changes the hue of the text.

green

This parameter sets the green component of the text color. It accepts values from 0 to 255, where 0 is no green and 255 is full green. Adjusting this value changes the hue of the text.

blue

This parameter sets the blue component of the text color. It accepts values from 0 to 255, where 0 is no blue and 255 is full blue. Adjusting this value changes the hue of the text.

outline_size

This parameter specifies the thickness of the text outline. A value of 0 means no outline, while higher values increase the thickness. Outlines can help make the text more readable against complex backgrounds.

outline_red

This parameter sets the red component of the outline color. It accepts values from 0 to 255, where 0 is no red and 255 is full red. Adjusting this value changes the hue of the outline.

outline_green

This parameter sets the green component of the outline color. It accepts values from 0 to 255, where 0 is no green and 255 is full green. Adjusting this value changes the hue of the outline.

outline_blue

This parameter sets the blue component of the outline color. It accepts values from 0 to 255, where 0 is no blue and 255 is full blue. Adjusting this value changes the hue of the outline.

alpha

This parameter controls the transparency of the text. It accepts values from 0.0 to 1.0, where 0.0 is fully transparent and 1.0 is fully opaque. Adjusting this value can help blend the text with the image.

margin_x

This parameter sets the horizontal margin around the text. It defines the space between the text and the edges of its bounding box. Proper margins ensure that the text does not touch the edges of the image.

margin_y

This parameter sets the vertical margin around the text. It defines the space between the text and the edges of its bounding box. Proper margins ensure that the text does not touch the edges of the image.

ImageText Output Parameters:

IMAGE

The output of this node is an image with the specified text drawn onto it. The image is returned as a tensor, which can be further processed or saved as needed. This output is crucial for integrating textual elements into your visual projects.

ImageText Usage Tips:

  • To ensure readability, choose a font size and color that contrast well with the background image.
  • Use the outline feature to make the text stand out against complex or colorful backgrounds.
  • Experiment with different alignments and margins to achieve the best visual balance for your text.
  • Adjust the alpha parameter to blend the text smoothly with the image, especially if you want a watermark effect.

ImageText Common Errors and Solutions:

Font file not found

  • Explanation: The specified font file could not be located in the fonts directory.
  • Solution: Ensure that the font file name is correct and that it is placed in the appropriate directory.

Text exceeds image boundaries

  • Explanation: The text, including margins, is too large to fit within the image dimensions.
  • Solution: Reduce the font size, adjust the margins, or split the text into multiple lines to fit within the image boundaries.

Invalid color value

  • Explanation: One of the color parameters (red, green, blue) is set to a value outside the range of 0 to 255. - Solution: Ensure that all color values are within the valid range of 0 to 255.

Invalid alpha value

  • Explanation: The alpha parameter is set to a value outside the range of 0.0 to 1.0.
  • Solution: Ensure that the alpha value is within the valid range of 0.0 to 1.0.

ImageText Related Nodes

Go back to the extension to check out more related nodes.
Allor Plugin
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.