ComfyUI  >  Nodes  >  ImagesGrid >  ImagesGridByRows

ComfyUI Node: ImagesGridByRows

Class Name

ImagesGridByRows

Category
ImagesGrid
Author
LEv145 (Account age: 2262 days)
Extension
ImagesGrid
Latest Updated
5/30/2024
Github Stars
0.1K

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

ImagesGridByRows Description

Create visually appealing image grids arranged by rows with automatic column calculation for balanced layouts.

ImagesGridByRows:

The ImagesGridByRows node is designed to help you create a visually appealing grid of images arranged by rows. This node is particularly useful when you have a collection of images and you want to display them in a structured format, making it easier to compare and analyze them side by side. By specifying the maximum number of rows, the node automatically calculates the necessary number of columns to accommodate all images, ensuring a balanced and organized layout. This functionality is ideal for creating image galleries, comparison charts, or any visual presentation where a grid format enhances clarity and aesthetics.

ImagesGridByRows Input Parameters:

images

This parameter expects a list of images that you want to arrange in a grid. Each image should be in the format of a tensor. The images will be converted internally to a format suitable for grid creation.

gap

The gap parameter defines the space between each image in the grid. It is an integer value with a default of 0, meaning no gap. You can increase this value to add more space between images, which can help in distinguishing individual images more clearly. The minimum value is 0, and there is no explicit maximum value, but it should be a reasonable number based on your grid size.

max_rows

The max_rows parameter specifies the maximum number of rows in the grid. It is an integer value with a default of 1, meaning all images will be placed in a single row if not specified otherwise. The minimum value is 1, and there is no explicit maximum value, but it should be set according to the number of images and the desired layout.

annotation

This optional parameter allows you to add annotations to your grid. It accepts an Annotation object that includes column texts, row texts, and a font. This can be useful for adding labels or descriptions to your grid, enhancing the informational value of the visual presentation.

ImagesGridByRows Output Parameters:

IMAGE

The output of this node is a single image tensor representing the grid of images arranged by rows. This output can be used directly in your projects or further processed as needed. The grid image will include all the input images arranged according to the specified parameters, providing a clear and organized visual representation.

ImagesGridByRows Usage Tips:

  • To create a balanced grid, ensure that the max_rows parameter is set appropriately based on the total number of images you have.
  • Use the gap parameter to add space between images, which can help in distinguishing individual images more clearly.
  • Utilize the annotation parameter to add informative labels or descriptions to your grid, making it more useful for presentations or analysis.

ImagesGridByRows Common Errors and Solutions:

ValueError: Column text and row text is empty

  • Explanation: This error occurs when both column and row texts are not provided in the annotation parameter.
  • Solution: Ensure that at least one of the column texts or row texts is provided in the annotation parameter to avoid this error.

IndexError: list index out of range

  • Explanation: This error may occur if the number of images does not match the expected grid layout based on the max_rows parameter.
  • Solution: Verify that the max_rows parameter is set correctly and that the number of images can be evenly distributed within the specified rows.

TypeError: Expected input to be a tensor

  • Explanation: This error occurs if the input images are not in the expected tensor format.
  • Solution: Ensure that all input images are provided as tensors. You may need to convert images to tensors before passing them to the node.

ImagesGridByRows 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.