ComfyUI > Nodes > ComfyUI Easy Use > ImageSize (Side)

ComfyUI Node: ImageSize (Side)

Class Name

easy imageSizeBySide

Category
EasyUse/Image
Author
yolain (Account age: 1341days)
Extension
ComfyUI Easy Use
Latest Updated
2024-06-25
Github Stars
0.51K

How to Install ComfyUI Easy Use

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

ImageSize (Side) Description

Determine image resolution based on longest or shortest side for flexible image processing.

ImageSize (Side):

The easy imageSizeBySide node is designed to help you determine the resolution of an image based on either its longest or shortest side. This node is particularly useful when you need to resize or process images while maintaining their aspect ratio. By providing the option to choose between the longest and shortest side, it offers flexibility in handling images of various dimensions, ensuring that you can easily obtain the desired resolution for your creative projects.

ImageSize (Side) Input Parameters:

image

This parameter expects an image input. The image should be in a format that the node can process, typically a tensor or array representing the image data. The image parameter is crucial as it provides the raw data from which the node will calculate the resolution based on the specified side.

side

This parameter allows you to choose between "Longest" and "Shortest" side of the image. Selecting "Longest" will return the resolution of the image's longest side, while selecting "Shortest" will return the resolution of the image's shortest side. This choice impacts the output resolution and is essential for tasks where maintaining a specific aspect ratio or dimension is important. The available options are:

  • "Longest"
  • "Shortest"

ImageSize (Side) Output Parameters:

resolution

This output parameter provides the resolution of the specified side (either longest or shortest) of the image. The resolution is returned as an integer value, representing the number of pixels along the chosen side. This output is useful for further image processing tasks where specific dimensions are required.

ImageSize (Side) Usage Tips:

  • Use the "Longest" side option when you need to ensure that the largest dimension of your image fits within a specific size constraint.
  • Use the "Shortest" side option when you need to ensure that the smallest dimension of your image fits within a specific size constraint.
  • Combine this node with other image processing nodes to create a workflow that dynamically adjusts image sizes based on your project's requirements.

ImageSize (Side) Common Errors and Solutions:

"Invalid image input"

  • Explanation: This error occurs when the provided image is not in a format that the node can process.
  • Solution: Ensure that the image input is a valid tensor or array representing the image data.

"Invalid side option"

  • Explanation: This error occurs when the side parameter is not set to either "Longest" or "Shortest".
  • Solution: Verify that the side parameter is correctly set to either "Longest" or "Shortest" before executing the node.

"Image dimensions not found"

  • Explanation: This error occurs when the node is unable to determine the dimensions of the provided image.
  • Solution: Ensure that the image input is correctly formatted and that it contains valid dimension data. If the issue persists, check the image processing pipeline for any steps that might alter the image dimensions.

ImageSize (Side) Related Nodes

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