ComfyUI > Nodes > ComfyUI 1hewNodes > Int Image Side Length

ComfyUI Node: Int Image Side Length

Class Name

1hew_IntImageSideLength

Category
1hewNodes/int
Author
1hew (Account age: 1113days)
Extension
ComfyUI 1hewNodes
Latest Updated
2026-04-17
Github Stars
0.03K

How to Install ComfyUI 1hewNodes

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

Int Image Side Length Description

Extracts specific image dimensions (longest, shortest, width, height) for precise resizing tasks.

Int Image Side Length:

The 1hew_IntImageSideLength node is designed to extract a specific dimension from an image, providing a straightforward way to determine the size of an image's side based on user preference. This node is particularly useful for AI artists who need to quickly ascertain the dimensions of an image for further processing or analysis. By selecting from options such as the longest side, shortest side, width, or height, you can easily obtain the desired measurement without delving into complex image processing techniques. This functionality is essential for tasks that require precise dimension control, such as resizing or cropping images to fit specific criteria.

Int Image Side Length Input Parameters:

image

The image parameter is the input image from which the side length will be extracted. It is expected to be a tensor representation of the image, typically in a format that includes height, width, and channels. This parameter is crucial as it serves as the source from which the node calculates the desired dimension. There are no specific minimum or maximum values for this parameter, but it must be a valid image tensor for the node to function correctly.

mode

The mode parameter determines which dimension of the image will be extracted. It offers four options: "longest," "shortest," "width," and "height." The default value is "shortest." Selecting "longest" will return the length of the longest side of the image, "shortest" will return the length of the shortest side, "width" will provide the width, and "height" will give the height. This parameter allows you to tailor the node's output to your specific needs, making it versatile for various image processing tasks.

Int Image Side Length Output Parameters:

int

The int output parameter represents the integer value of the selected image dimension based on the mode specified. This output is crucial for further processing steps where knowing the exact size of an image's side is necessary, such as when resizing images to maintain aspect ratios or when preparing images for specific display requirements. The output is straightforward and provides a clear numerical value that can be easily interpreted and utilized in subsequent workflows.

Int Image Side Length Usage Tips:

  • Use the "shortest" mode when you need to ensure that an image fits within a specific bounding box, as it provides the smallest dimension.
  • Select the "longest" mode when you want to maintain the aspect ratio of an image while resizing it to fit a larger display area.

Int Image Side Length Common Errors and Solutions:

Invalid image tensor

  • Explanation: This error occurs when the input image is not a valid tensor or does not have the required dimensions.
  • Solution: Ensure that the input image is a valid tensor with at least three dimensions (height, width, and channels).

Unsupported mode value

  • Explanation: This error happens when the mode parameter is set to a value that is not one of the supported options ("longest," "shortest," "width," "height").
  • Solution: Verify that the mode parameter is set to one of the supported options and correct it if necessary.

Int Image Side Length Related Nodes

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

Int Image Side Length