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

ComfyUI Node: ImageSize (LongerSide)

Class Name

easy imageSizeByLongerSide

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 (LongerSide) Description

Determines image resolution based on longer side for maintaining aspect ratio and visual quality.

ImageSize (LongerSide):

The easy imageSizeByLongerSide node is designed to help you determine the resolution of an image based on its longer side. This node is particularly useful when you need to resize or process images while maintaining their aspect ratio. By focusing on the longer side, you can ensure that the image's primary dimension is preserved, which is often crucial for maintaining visual quality and consistency. This node simplifies the process of identifying the longer side of an image, making it easier to apply subsequent transformations or adjustments.

ImageSize (LongerSide) Input Parameters:

image

The image parameter expects an image input. This is the image whose longer side resolution you want to determine. The image should be provided in a format that the node can process, typically as an array or tensor representing the image data.

side

The side parameter allows you to specify whether you want to determine the resolution of the "Longest" or "Shortest" side of the image. This parameter accepts two options: "Longest" and "Shortest". Choosing "Longest" will return the resolution of the longer side of the image, while choosing "Shortest" will return the resolution of the shorter side. This flexibility allows you to tailor the node's output to your specific needs.

ImageSize (LongerSide) Output Parameters:

resolution

The resolution output parameter provides the resolution of the specified side (either "Longest" or "Shortest") of the image. This is an integer value representing the number of pixels along the chosen side. This output is crucial for tasks that require precise control over image dimensions, such as resizing or cropping.

ImageSize (LongerSide) Usage Tips:

  • Use the side parameter to quickly determine the longer side of an image when you need to resize it while maintaining the aspect ratio.
  • Combine this node with other image processing nodes to create a workflow that automatically adjusts image dimensions based on the longer side, ensuring consistent output sizes.

ImageSize (LongerSide) 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 is provided as an array or tensor representing the image data. Check the input format and convert it if necessary.

"Invalid side option"

  • Explanation: This error occurs when the side parameter is set to a value other than "Longest" or "Shortest".
  • Solution: Verify that the side parameter is set to either "Longest" or "Shortest". Correct any typos or invalid values in the parameter.

"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 valid and that the image data includes dimension information. If the image is corrupted or incomplete, provide a different image.

ImageSize (LongerSide) 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.