Visit ComfyUI Online for ready-to-use ComfyUI environment
Extract and convert image dimensions into numerical values for AI artists, enabling precise control and manipulation in workflows.
The Image Size to Number node is designed to extract and convert the dimensions of an image into numerical values. This node is particularly useful for AI artists who need to work with image dimensions programmatically, allowing for precise control and manipulation of image sizes within their workflows. By converting the width and height of an image into various numerical formats, this node facilitates a range of operations that depend on image dimensions, such as resizing, cropping, and scaling. The primary goal of this node is to provide a straightforward method to obtain image size information in multiple numerical representations, making it easier to integrate with other nodes and processes.
The image
parameter is the only required input for this node. It accepts an image in the format specified by the system (typically a tensor representation of an image). This parameter is crucial as it provides the image whose dimensions will be extracted and converted into numerical values. The image should be in a compatible format to ensure accurate processing and extraction of size information.
The width_num
output parameter represents the width of the input image as a numerical value. This value is useful for operations that require the image width in a numerical format.
The height_num
output parameter represents the height of the input image as a numerical value. This value is useful for operations that require the image height in a numerical format.
The width_float
output parameter provides the width of the input image as a floating-point number. This format is particularly useful for calculations that require decimal precision.
The height_float
output parameter provides the height of the input image as a floating-point number. This format is particularly useful for calculations that require decimal precision.
The width_int
output parameter gives the width of the input image as an integer. This format is useful for operations that require whole number dimensions.
The height_int
output parameter gives the height of the input image as an integer. This format is useful for operations that require whole number dimensions.
width_num
and height_num
outputs when you need the image dimensions in a general numerical format for further processing or calculations.width_float
and height_float
outputs for operations that require high precision, such as scaling or aspect ratio calculations.width_int
and height_int
outputs when you need the dimensions as whole numbers, which is often required for pixel-based operations.© Copyright 2024 RunComfy. All Rights Reserved.