ComfyUI > Nodes > ImagesGrid > GridAnnotation

ComfyUI Node: GridAnnotation

Class Name

GridAnnotation

Category
ImagesGrid
Author
LEv145 (Account age: 2262days)
Extension
ImagesGrid
Latest Updated
2024-05-30
Github Stars
0.14K

How to Install ImagesGrid

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

GridAnnotation Description

Enhance image grids with customizable text annotations for columns and rows, improving visual appeal and information clarity.

GridAnnotation:

The GridAnnotation node is designed to enhance your image grids by adding customizable text annotations to both columns and rows. This node allows you to specify text for each column and row, which can be particularly useful for labeling or providing additional context to the images in your grid. By using a specified font and size, the annotations are rendered clearly, making your grids more informative and visually appealing. This node is ideal for creating annotated image grids for presentations, reports, or any other context where labeled images are beneficial.

GridAnnotation Input Parameters:

column_texts

This parameter allows you to input the text that will be displayed at the top of each column in the grid. The text should be provided as a single string, with each column's text separated by a semicolon (;). This makes it easy to label each column with relevant information. The text can be multiline, allowing for more detailed annotations if needed.

row_texts

Similar to column_texts, this parameter is used to input the text that will be displayed at the beginning of each row in the grid. The text should be provided as a single string, with each row's text separated by a semicolon (;). This allows for clear and concise labeling of each row, which can be particularly useful for categorizing or describing the images in each row. The text can also be multiline.

font_size

This parameter specifies the size of the font used for the annotations. It is an integer value with a default of 50, and it must be at least 1. Adjusting the font size allows you to control the visibility and readability of the annotations, ensuring that they are appropriately sized for the grid and the context in which it will be viewed.

GridAnnotation Output Parameters:

GRID_ANNOTATION

The output of this node is a GRID_ANNOTATION object, which contains the processed annotations for the grid. This object includes the column texts, row texts, and the font used for rendering the annotations. It is used by other nodes to generate the final annotated image grid, ensuring that the annotations are correctly applied and displayed.

GridAnnotation Usage Tips:

  • Ensure that your column_texts and row_texts are concise and relevant to make the annotations clear and informative.
  • Use the font_size parameter to adjust the text size according to the resolution and size of your image grid to maintain readability.
  • Separate each column or row text with a semicolon (;) to ensure they are correctly parsed and displayed in the grid.

GridAnnotation Common Errors and Solutions:

ValueError: Column text and row text is empty

  • Explanation: This error occurs when both column_texts and row_texts are left empty.
  • Solution: Ensure that at least one of the column_texts or row_texts parameters is provided with valid text.

OSError: cannot open resource

  • Explanation: This error occurs when the specified font file cannot be found or opened.
  • Solution: Verify that the font file path is correct and that the file exists at the specified location. Ensure that the Roboto-Regular.ttf font file is present in the STATIC_PATH directory.

IndexError: list index out of range

  • Explanation: This error occurs when the number of texts provided in column_texts or row_texts exceeds the number of columns or rows in the grid.
  • Solution: Ensure that the number of texts in column_texts and row_texts matches the number of columns and rows in your image grid, respectively. Adjust the texts or the grid dimensions accordingly.

GridAnnotation Related Nodes

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