ComfyUI  >  Nodes  >  ComfyUI - Text Overlay Plugin >  Image Text Overlay

ComfyUI Node: Image Text Overlay

Class Name

Image Text Overlay

Category
image/text
Author
mikkel (Account age: 5971 days)
Extension
ComfyUI - Text Overlay Plugin
Latest Updated
8/17/2024
Github Stars
0.0K

How to Install ComfyUI - Text Overlay Plugin

Install this extension via the ComfyUI Manager by searching for  ComfyUI - Text Overlay Plugin
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI - Text Overlay 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

Image Text Overlay Description

Add custom text to images with various parameters for font, position, alignment, and color, enhancing visual content creatively.

Image Text Overlay:

The Image Text Overlay node allows you to add custom text to an image, providing a powerful tool for creating annotated images, memes, or any visual content that requires text integration. This node is designed to be user-friendly, enabling you to specify various parameters such as font size, position, font type, alignment, and color of the text. By converting images between tensor and PIL formats, it ensures compatibility with various image processing workflows. The main goal of this node is to offer a flexible and efficient way to overlay text on images, enhancing your creative projects with personalized text elements.

Image Text Overlay Input Parameters:

image

This parameter expects an image input in tensor format. The image serves as the canvas on which the text will be overlaid.

text

This parameter is a string that represents the text you want to overlay on the image. It supports multiline text and has a default value of "Hello".

font_size

This integer parameter specifies the size of the font for the text. It ranges from a minimum of 1 to a maximum of 256, with a default value of 16. Adjusting the font size will impact the visibility and emphasis of the text on the image.

x

This integer parameter defines the x-coordinate for the text's starting position on the image. The default value is 0. Changing this value will move the text horizontally across the image.

y

This integer parameter defines the y-coordinate for the text's starting position on the image. The default value is 0. Changing this value will move the text vertically across the image.

font

This string parameter specifies the path to the font file (e.g., "arial.ttf") to be used for the text. The default value is "arial.ttf". Using different fonts can significantly alter the appearance and style of the text.

alignment

This parameter determines the alignment of the text relative to the x-coordinate. It can be "left", "right", or "center", with a default value of "left". Adjusting the alignment helps in positioning the text more precisely according to your design needs.

color

This integer parameter represents the color of the text in hexadecimal format (e.g., 0xFFFFFF for white). It ranges from 0 to 0xFFFFFF, with a default value of 0 (black). Changing the color can enhance the text's visibility and aesthetic appeal on the image.

Image Text Overlay Output Parameters:

IMAGE

The output is an image tensor with the specified text overlaid on it. This output can be used in further image processing workflows or saved as a final annotated image.

Image Text Overlay Usage Tips:

  • To ensure the text is clearly visible, choose a font color that contrasts well with the background of the image.
  • Experiment with different font sizes and alignments to find the best positioning for your text.
  • Use high-quality font files to maintain the readability and sharpness of the text on the image.
  • If the text needs to be centered, use the "center" alignment and adjust the x-coordinate accordingly.

Image Text Overlay Common Errors and Solutions:

Font file not found

  • Explanation: The specified font file path is incorrect or the file does not exist.
  • Solution: Ensure the font file path is correct and the file is accessible. Verify that the font file is in the expected directory.

Invalid color value

  • Explanation: The color parameter is set to a value outside the acceptable range (0 to 0xFFFFFF).
  • Solution: Set the color parameter to a valid hexadecimal value within the specified range.

Text exceeds image boundaries

  • Explanation: The specified text, font size, and position cause the text to extend beyond the image boundaries.
  • Solution: Adjust the font size, x, and y coordinates to ensure the text fits within the image dimensions. Use the alignment parameter to better position the text.

Image Text Overlay Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI - Text Overlay 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.