Visit ComfyUI Online for ready-to-use ComfyUI environment
Efficiently adjust image dimensions with rescale factor, tailored rounding methods for consistent resizing across projects.
The D2 Resize Calculator is a versatile tool designed to help you efficiently adjust the dimensions of your images by applying a rescale factor. This node is particularly useful for AI artists who need to resize images while maintaining aspect ratios or preparing images for further processing. By leveraging different rounding methods, the D2 Resize Calculator ensures that the resized dimensions are tailored to your specific needs, whether you want to round up, round down, or simply apply a straightforward multiplication. This node simplifies the resizing process, making it accessible even to those without a technical background, and provides a reliable way to achieve consistent image dimensions across various projects.
The width
parameter specifies the initial width of the image you wish to resize. It accepts integer values ranging from 64 to 8192, with a default value of 1024. This parameter determines the starting width before any rescaling is applied, and it plays a crucial role in calculating the final dimensions of the image.
The height
parameter defines the initial height of the image to be resized. Similar to the width, it accepts integer values between 64 and 8192, with a default of 1024. This parameter, along with the width, is used to compute the new dimensions after applying the rescale factor.
The rescale_factor
is a floating-point value that determines the scale by which the original dimensions will be multiplied. It ranges from 0.1 to 16, with a default value of 2.0. This factor allows you to increase or decrease the size of the image proportionally, providing flexibility in how much you want to scale the image.
The round_method
parameter offers options for handling the rounding of the new dimensions after rescaling. You can choose from "Floor", "Round", "Ceil", or "None", with "Round" being the default. This parameter affects how the final dimensions are adjusted, ensuring they meet your specific requirements for precision or alignment.
The width
output represents the new width of the image after applying the rescale factor and rounding method. This integer value reflects the adjusted dimension, ensuring the image is resized according to your specified parameters.
The height
output indicates the new height of the image post-rescaling. Like the width, this integer value is calculated based on the original height, the rescale factor, and the chosen rounding method, providing a resized dimension that fits your needs.
The rescale_factor
output simply returns the rescale factor used in the calculation. This floating-point value confirms the scale applied to the original dimensions, allowing you to verify the resizing process.
width
and height
parameters are set proportionally before applying the rescale_factor
.round_method
parameter to control the precision of your resized dimensions. For example, use "Floor" to ensure dimensions are always rounded down, which can be useful for fitting images into specific layouts.<method>
. Must be one of ['round', 'ceil', 'floor', 'none']round_method
parameter.round_method
parameter is set to one of the valid options: "Floor", "Round", "Ceil", or "None".width
or height
parameters are set outside the allowed range.width
and height
values to be within the specified range of 64 to 8192.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.