ComfyUI > Nodes > SDXL_sizing > IMAGE -> 'WIDTHxHEIGHT'

ComfyUI Node: IMAGE -> 'WIDTHxHEIGHT'

Class Name

get_aspect_from_image

Category
sizing/input conversions
Author
Ser-Hilary (Account age: 1030days)
Extension
SDXL_sizing
Latest Updated
2024-05-23
Github Stars
0.03K

How to Install SDXL_sizing

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

Extracts image dimensions as a string for easy aspect ratio understanding and usage.

IMAGE -> 'WIDTHxHEIGHT':

The get_aspect_from_image node is designed to extract and convert the dimensions of an image into a string format, providing a straightforward way to understand and utilize the aspect ratio of an image. This node is particularly useful for AI artists who need to work with image dimensions in a more intuitive and accessible manner. By converting the width and height of an image into a string, it simplifies the process of managing and adjusting image sizes for various creative projects. The node's primary function is to take an image as input and return its dimensions in a format that is easy to interpret and use in further processing or decision-making.

IMAGE -> 'WIDTHxHEIGHT' Input Parameters:

image

The image parameter is the sole input for this node and represents the image whose dimensions you want to extract. This parameter is crucial as it directly influences the output values, which are derived from the image's width and height. The image should be provided in a format that the node can process, typically as a tensor or similar data structure. There are no specific minimum, maximum, or default values for this parameter, as it depends entirely on the image you are working with.

IMAGE -> 'WIDTHxHEIGHT' Output Parameters:

input_str

The input_str output parameter provides the dimensions of the input image in a string format, such as "1920x1080". This output is essential for quickly understanding the aspect ratio and size of the image, making it easier to communicate and use in various applications.

int_width

The int_width output parameter represents the width of the input image as an integer. This value is important for tasks that require precise control over the image's width, such as resizing or cropping.

int_height

The int_height output parameter represents the height of the input image as an integer. Similar to int_width, this value is crucial for operations that depend on the exact height of the image, ensuring that any modifications maintain the desired proportions.

IMAGE -> 'WIDTHxHEIGHT' Usage Tips:

  • Use the get_aspect_from_image node to quickly convert image dimensions into a string format, which can be helpful for logging or displaying image sizes in a user-friendly manner.
  • Combine this node with other nodes that require dimension inputs to streamline workflows, ensuring that image sizes are consistently and accurately represented across different processes.

IMAGE -> 'WIDTHxHEIGHT' Common Errors and Solutions:

Invalid image dimensions: 0x0

  • Explanation: This error occurs when the input image has invalid dimensions, such as a width or height of zero.
  • Solution: Ensure that the input image is correctly loaded and has valid dimensions before passing it to the node.

Image input not recognized

  • Explanation: This error may arise if the input provided is not in a format that the node can process.
  • Solution: Verify that the image is in the correct format, such as a tensor, and that it is properly structured for the node to interpret.

IMAGE -> 'WIDTHxHEIGHT' Related Nodes

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

IMAGE -> 'WIDTHxHEIGHT'