ComfyUI > Nodes > ComfyUI > Get Image Size

ComfyUI Node: Get Image Size

Class Name

GetImageSize

Category
image
Author
ComfyAnonymous (Account age: 763days)
Extension
ComfyUI
Latest Updated
2026-05-13
Github Stars
112.77K

How to Install ComfyUI

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

Get Image Size Description

Extracts image dimensions for AI artists and developers without altering content, aiding in informed decision-making for creative projects.

Get Image Size:

The GetImageSize node is designed to provide essential information about an image by extracting its dimensions. This node is particularly useful for AI artists and developers who need to understand the size of an image without altering its content. By returning the width, height, and batch size of the image, the node allows you to make informed decisions about further processing or adjustments needed for your creative projects. The primary goal of this node is to facilitate seamless integration into workflows where image size is a critical factor, ensuring that you can maintain consistency and quality in your work.

Get Image Size Input Parameters:

image

The image parameter is the input for the GetImageSize node, representing the image whose dimensions you wish to retrieve. This parameter is crucial as it directly influences the node's ability to extract and return the correct width, height, and batch size. The image should be provided in a compatible format that the node can process, typically as a tensor or array. There are no specific minimum, maximum, or default values for this parameter, as it depends on the image data you are working with.

Get Image Size Output Parameters:

width

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

height

The height output parameter gives the height of the input image in pixels. Similar to the width, this value is crucial for understanding the vertical dimension of the image. It helps in maintaining the aspect ratio and ensuring that the image aligns with the intended design or layout. The height is particularly important when you need to scale images or fit them into predefined spaces.

batch_size

The batch_size output parameter indicates the number of images processed in a batch. This is particularly useful when working with datasets or when processing multiple images simultaneously. Understanding the batch size helps in managing resources and optimizing the workflow, especially in scenarios where batch processing is involved.

Get Image Size Usage Tips:

  • Use the GetImageSize node to quickly verify the dimensions of an image before applying transformations or processing steps that depend on specific size requirements.
  • Integrate this node into your workflow to ensure that images meet the necessary size criteria for your project, helping to maintain consistency and quality across your work.

Get Image Size Common Errors and Solutions:

Image format not supported

  • Explanation: The input image is not in a format that the node can process.
  • Solution: Ensure that the image is provided in a compatible format, such as a tensor or array, that the node can interpret.

Image data is corrupted

  • Explanation: The input image data is corrupted or incomplete, preventing the node from extracting dimensions.
  • Solution: Verify the integrity of the image data and ensure it is complete and correctly formatted before inputting it into the node.

Get Image Size Related Nodes

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

Get Image Size