ComfyUI > Nodes > kaytool > 𝙆 Image Size Extractor

ComfyUI Node: 𝙆 Image Size Extractor

Class Name

Image_Size_Extractor

Category
KayTool
Author
kk8bit (Account age: 1010days)
Extension
kaytool
Latest Updated
2026-04-06
Github Stars
0.34K

How to Install kaytool

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

Extracts image dimensions (width, height) for processing 3D/4D tensors in creative workflows.

𝙆 Image Size Extractor:

The ImageSizeExtractor node is designed to efficiently determine the dimensions of an image, specifically its width and height. This node is particularly useful for AI artists and developers who need to process images and require precise dimension data for further manipulation or analysis. By extracting the size of the image, this node facilitates tasks such as resizing, cropping, or aligning images within a project. The node is capable of handling both 3D and 4D image tensors, making it versatile for various image processing workflows. Its primary goal is to provide accurate dimension data in a straightforward manner, ensuring that users can seamlessly integrate this information into their creative processes.

𝙆 Image Size Extractor Input Parameters:

image

The image parameter is the sole input for the ImageSizeExtractor node. It represents the image whose dimensions are to be extracted. This parameter accepts an image tensor, which can be either a 3D tensor (height, width, channels) or a 4D tensor (batch size, height, width, channels). The node automatically detects the shape of the tensor and extracts the relevant dimensions. There are no specific minimum, maximum, or default values for this parameter, as it is dependent on the image data provided by the user. The function of this parameter is to supply the node with the necessary image data to perform the dimension extraction.

𝙆 Image Size Extractor Output Parameters:

width

The width output parameter provides the width of the input image. This value is crucial for understanding the horizontal dimension of the image, which can be used for various image processing tasks such as resizing or aligning images within a layout. The width is extracted directly from the image tensor and is returned as an integer value.

height

The height output parameter provides the height of the input image. This value is essential for understanding the vertical dimension of the image, which is important for tasks like cropping or fitting images into specific aspect ratios. Similar to the width, the height is extracted from the image tensor and is returned as an integer value.

𝙆 Image Size Extractor Usage Tips:

  • Ensure that the input image is in the correct tensor format (either 3D or 4D) to avoid errors and ensure accurate dimension extraction.
  • Use the extracted width and height values to inform subsequent image processing tasks, such as resizing or cropping, to maintain the desired aspect ratio and composition.

𝙆 Image Size Extractor Common Errors and Solutions:

Unexpected image shape. Expected 3D or 4D tensor.

  • Explanation: This error occurs when the input image does not conform to the expected 3D or 4D tensor format.
  • Solution: Verify that the input image is correctly formatted as a 3D or 4D tensor before passing it to the node. If necessary, reshape or preprocess the image to meet these requirements.

Error processing image: <specific error message>

  • Explanation: This is a generic error message indicating that an exception occurred during the execution of the node.
  • Solution: Check the specific error message provided to diagnose the issue. Common problems may include incorrect image data types or corrupted image files. Ensure that the input image is valid and correctly formatted.

𝙆 Image Size Extractor Related Nodes

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