Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > comfyui-yaser-nodes > 📏 ImageSize (Side) - Yaser

ComfyUI Node: 📏 ImageSize (Side) - Yaser

Class Name

ImageSizeBySide

Category
Yaser/Image
Author
yaserjaradeh (Account age: 4398days)
Extension
comfyui-yaser-nodes
Latest Updated
2025-10-17
Github Stars
0.01K

How to Install comfyui-yaser-nodes

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

📏 ImageSize (Side) - Yaser Description

Returns the pixel length of an image's longest or shortest side without changing the image.

📏 ImageSize (Side) - Yaser:

ImageSizeBySide measures an image and reports the dimension of either its longer or shorter side. This gives you a quick way to base another step in your workflow on the image’s actual size, regardless of whether it is portrait, landscape, or square. The node reads the image’s height and width and compares them; it does not resize or otherwise change the image.

📏 ImageSize (Side) - Yaser Input Parameters:

image

The image to measure. This required input accepts an IMAGE connection. The node reads its height and width from the image data and uses those dimensions for the comparison. No minimum, maximum, or default image size is specified in the source; the connected image must have the expected four-dimensional image shape.

side

Chooses which dimension to report. This required selection has exactly two options: Longest returns the larger of the image’s width and height, while Shortest returns the smaller. For a square image, both choices return the same value. The source specifies no default selection or numeric minimum and maximum.

📏 ImageSize (Side) - Yaser Output Parameters:

resolution

An INT containing the selected side length: the larger dimension when side is Longest, or the smaller dimension when it is Shortest. For example, an image that is 1024 pixels wide and 768 pixels high produces 1024 for Longest and 768 for Shortest. The node also displays the number as text in its UI; that display is not an additional output socket.

📏 ImageSize (Side) - Yaser Usage Tips:

  • Choose Longest when a later step needs a number based on the image’s largest dimension, regardless of orientation.
  • Choose Shortest when a later step needs a number based on the dimension that limits the image’s size.
  • Connect the image you intend to measure. If an earlier node resizes it, connect that node’s resulting image to measure the resized dimensions.
  • You do not need to switch settings when changing between portrait and landscape images: the node compares width and height for you.

📏 ImageSize (Side) - Yaser Common Errors and Solutions:

Required input is missing

  • Explanation: The workflow may report a missing required input if image is not connected or side has no valid selection. The exact validation message depends on the host application.
  • Solution: Connect an IMAGE output to image and select either Longest or Shortest.

ValueError: not enough values to unpack or ValueError: too many values to unpack

  • Explanation: The node expects the image data to have four dimensions. This error can occur if something with a different shape reaches the node.
  • Solution: Check that the connection supplies a standard IMAGE value, rather than a mask, single-channel array, or other data with an incompatible shape.

AttributeError mentioning shape

  • Explanation: The supplied value does not provide the image-shape information the node reads. This can happen when incompatible data reaches the input.
  • Solution: Reconnect image to a node that produces an IMAGE output and check any conversion steps upstream.

UnboundLocalError mentioning result

  • Explanation: The source assigns a result only when side is exactly Longest or Shortest. A different value passed to the node could leave the result unset; the normal selection menu limits you to the two supported choices.
  • Solution: Select one of the two provided options. If the value comes from a modified workflow or custom integration, make sure its spelling and capitalization match exactly.

📏 ImageSize (Side) - Yaser Related Nodes

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

📏 ImageSize (Side) - Yaser