ComfyUI > Nodes > ComfyUI-tbox > Image Size

ComfyUI Node: Image Size

Class Name

ImageSize

Category
tbox/Image
Author
ai-shizuka (Account age: 3606days)
Extension
ComfyUI-tbox
Latest Updated
2025-04-22
Github Stars
0.02K

How to Install ComfyUI-tbox

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

Image Size Description

Provides image dimensions (width, height, batch size) for informed processing decisions.

Image Size:

The ImageSize node is designed to provide essential information about an image's dimensions, specifically its width, height, and batch size. This node is particularly useful for AI artists who need to understand the size attributes of their images for further processing or analysis. By extracting these dimensions, the node allows you to make informed decisions about how to handle images in your creative workflows, such as resizing or scaling them appropriately. The node operates by analyzing the image data and returning the relevant size metrics, ensuring that you have a clear understanding of the image's structure without altering the image itself. This functionality is crucial for maintaining consistency and accuracy in image processing tasks.

Image Size Input Parameters:

image

The image parameter is the sole input for the ImageSize node. It represents the image whose dimensions you wish to retrieve. This parameter is crucial as it directly influences the output values of width, height, and batch size. The image should be provided in a format that the node can interpret, typically as a multi-dimensional array where the dimensions correspond to batch size, height, and width. There are no specific minimum, maximum, or default values for this parameter, as it depends entirely on the image data you provide. The primary function of this parameter is to serve as the source from which the node extracts size information.

Image Size Output Parameters:

width

The width output parameter provides the width of the image in pixels. This value is essential for understanding the horizontal dimension of the image, which can be critical for tasks such as resizing or aligning images within a composition. Knowing the width allows you to maintain aspect ratios or ensure that images fit within specific layout constraints.

height

The height output parameter gives the height of the image in pixels. Similar to the width, this value is crucial for understanding the vertical dimension of the image. It helps in maintaining the correct aspect ratio when resizing images and ensures that the image fits within the desired vertical space in your projects.

count

The count output parameter, also referred to as batch size, indicates the number of images processed in a batch. This is particularly useful when working with collections of images or when processing images in parallel. Understanding the batch size can help you manage resources effectively and optimize processing workflows.

Image Size Usage Tips:

  • Use the ImageSize node to quickly verify the dimensions of your images before performing operations like resizing or cropping, ensuring that you maintain the desired aspect ratio and resolution.
  • Incorporate the ImageSize node into your workflow to automate the process of checking image dimensions, which can be particularly helpful when dealing with large batches of images.

Image Size Common Errors and Solutions:

Image shape not recognized

  • Explanation: This error occurs when the input image does not have the expected shape or dimensions, which the node requires to extract width, height, and batch size.
  • Solution: Ensure that the input image is formatted correctly, typically as a multi-dimensional array with dimensions corresponding to batch size, height, and width. Verify that the image data is compatible with the node's requirements.

Invalid image input

  • Explanation: This error arises when the input provided is not a valid image or is in an unsupported format.
  • Solution: Check that the input is a valid image file and is in a format that the node can process. Convert the image to a supported format if necessary before inputting it into the node.

Image Size Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-tbox
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 Models, enabling artists to harness the latest AI tools to create incredible art.