ComfyUI > Nodes > ComfyUI SKBundle > Text Box

ComfyUI Node: Text Box

Class Name

TextBox

Category
SKB/text
Author
SKBv0 (Account age: 1879days)
Extension
ComfyUI SKBundle
Latest Updated
2025-04-20
Github Stars
0.04K

How to Install ComfyUI SKBundle

Install this extension via the ComfyUI Manager by searching for ComfyUI SKBundle
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI SKBundle 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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Text Box Description

Facilitates text creation and rendering on customizable image canvas with various visual customization options for seamless integration into digital artwork.

Text Box:

The TextBox node is designed to facilitate the creation and rendering of text within a customizable image canvas. It allows you to input text and adjust various visual parameters to achieve the desired appearance, such as font size, color, and positioning. This node is particularly beneficial for AI artists who want to incorporate text into their digital artwork seamlessly. By providing a range of customization options, the TextBox node enables you to create visually appealing text elements that can be integrated into larger compositions. The primary function of this node is to render text onto an image canvas, which can then be used in various creative projects.

Text Box Input Parameters:

text

This parameter allows you to input the text string that you want to render on the image canvas. It supports multiline text, providing flexibility in how the text is displayed. The default value is an empty string.

font_size

This parameter determines the size of the text to be rendered. It accepts integer values ranging from 8 to 128, with a default value of 32. Adjusting the font size can significantly impact the readability and visual impact of the text.

text_color

This parameter specifies the color of the text using a hexadecimal color code. The default color is white (#FFFFFF). Changing the text color can help the text stand out or blend with the background, depending on your artistic intent.

text_gradient_start

This parameter allows you to define the starting color of a gradient applied to the text. It uses a hexadecimal color code, and the default is an empty string, indicating no gradient.

text_gradient_end

This parameter specifies the ending color of the gradient applied to the text. Like the start color, it uses a hexadecimal color code, with the default being an empty string.

text_gradient_angle

This parameter sets the angle of the gradient applied to the text, measured in degrees. It accepts integer values from 0 to 360, with a default of 0 degrees, indicating a horizontal gradient.

background_color

This parameter defines the color of the background behind the text using a hexadecimal color code. The default color is black (#000000). This can be adjusted to enhance the contrast and visibility of the text.

width

This parameter sets the width of the image canvas in pixels. It accepts integer values from 64 to 2048, with a default of 512 pixels. The width determines the horizontal space available for rendering the text.

height

This parameter specifies the height of the image canvas in pixels. It accepts integer values from 64 to 2048, with a default of 512 pixels. The height determines the vertical space available for rendering the text.

position_x

This parameter determines the horizontal position of the text on the canvas. It accepts integer values from 0 to 2048, with a default of 256 pixels, allowing you to position the text precisely.

position_y

This parameter sets the vertical position of the text on the canvas. It accepts integer values from 0 to 2048, with a default of 256 pixels, enabling precise vertical placement of the text.

rotation

This parameter allows you to rotate the text on the canvas. It accepts float values from -360.0 to 360.0 degrees, with a default of 0.0, providing flexibility in text orientation.

opacity

This parameter controls the transparency of the text, with a range from 0.0 (completely transparent) to 1.0 (fully opaque). The default value is 1.0, ensuring the text is fully visible.

background_visible

This boolean parameter determines whether the background color is visible behind the text. The default value is True, meaning the background is shown.

canvas_image

This parameter allows you to input a base64-encoded PNG image as the canvas. The default is an empty string, indicating no image is used. This can be useful for overlaying text on existing images.

Text Box Output Parameters:

IMAGE

The output of the TextBox node is an image that contains the rendered text. This image can be used in various creative projects, serving as a standalone piece or as part of a larger composition. The output image reflects all the input parameters, such as text content, color, size, and positioning, providing a visual representation of the configured text.

Text Box Usage Tips:

  • Experiment with different font sizes and colors to ensure your text is both readable and visually appealing within your artwork.
  • Utilize the gradient options to add depth and interest to your text, making it stand out or blend with the background as desired.
  • Adjust the position and rotation parameters to creatively place text within your composition, enhancing the overall design.

Text Box Common Errors and Solutions:

Image decoding error

  • Explanation: This error may occur if the canvas_image parameter is not a valid base64-encoded PNG image.
  • Solution: Ensure that the canvas_image string is correctly formatted and starts with data:image/png;base64,.

Invalid color code

  • Explanation: This error can happen if the color parameters (e.g., text_color, background_color) are not valid hexadecimal color codes.
  • Solution: Double-check that all color codes are in the correct format, such as #RRGGBB.

Out of bounds position

  • Explanation: This error might occur if the position_x or position_y values place the text outside the canvas dimensions.
  • Solution: Verify that the position values are within the canvas size specified by the width and height parameters.

Text Box Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI SKBundle
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.