Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates image size selection and manipulation in ComfyUI for AI artists, offering flexibility and efficiency.
The D2 Size Slector node is designed to facilitate the selection and manipulation of image sizes within the ComfyUI environment. This node is particularly useful for AI artists who need to adjust image dimensions for various creative projects. By providing a streamlined method to determine and set image sizes, the D2 Size Slector helps ensure that images are prepared correctly for further processing or display. It offers flexibility in handling image dimensions, allowing users to specify custom sizes or choose from preset options. The node also supports dimension swapping and rescaling, making it a versatile tool for managing image size requirements efficiently.
The preset
parameter allows you to select a predefined size configuration for your image. This can be particularly useful if you have standard dimensions that you frequently use, as it saves time and ensures consistency. The available options are defined in the size_util.SIZE_LIST
, and choosing a preset will automatically set the width and height according to the selected configuration.
The width
parameter specifies the desired width of the image in pixels. It allows for a range between 64 and 8192 pixels, with a default value of 1024 pixels. Adjusting this parameter will directly affect the horizontal dimension of the image, which is crucial for fitting specific display or processing requirements.
The height
parameter defines the desired height of the image in pixels. Similar to the width, it can be set between 64 and 8192 pixels, with a default of 1024 pixels. This parameter is essential for controlling the vertical dimension of the image, ensuring it meets the necessary criteria for your project.
The swap_dimensions
parameter is a boolean option that, when enabled, swaps the width and height of the image. This can be useful for quickly changing the orientation of an image from landscape to portrait or vice versa without manually adjusting both dimensions.
The upscale_factor
parameter determines the factor by which the image will be enlarged. It ranges from 0.1 to 16.0, with a default value of 1.0. This parameter is crucial for increasing the size of an image while maintaining its aspect ratio, which is often needed for high-resolution outputs.
The prescale_factor
parameter is similar to the upscale_factor
but is applied before any other scaling operations. It also ranges from 0.1 to 16.0, with a default of 1.0. This parameter allows for initial adjustments to the image size, providing an additional layer of control over the final dimensions.
The round_method
parameter specifies how the dimensions should be rounded during scaling operations. Options include "Floor", "Round", "Ceil", and "None", with "Round" as the default. This parameter is important for ensuring that the final dimensions are whole numbers, which is necessary for most image processing tasks.
The batch_size
parameter indicates the number of images to process simultaneously. It can be set between 1 and 64, with a default of 1. This parameter is useful for batch processing, allowing you to handle multiple images in a single operation, which can significantly improve efficiency.
The images
parameter is optional and allows you to input a set of images to be processed. If provided, the node will use the dimensions of these images as a reference for resizing operations. This parameter is particularly useful when working with a collection of images that need to be uniformly resized.
The width
output parameter provides the final width of the processed image in pixels. This value reflects any adjustments made through the input parameters and is essential for verifying that the image meets the desired specifications.
The height
output parameter gives the final height of the processed image in pixels. Like the width, this value confirms that the image has been resized correctly according to the specified parameters.
The upscale_factor
output parameter returns the factor by which the image was enlarged. This value is useful for understanding the extent of scaling applied to the image, which can be important for quality assessment and further processing.
The prescale_factor
output parameter indicates the initial scaling factor applied to the image. This value helps in tracking the sequence of transformations the image has undergone, providing insight into the resizing process.
The batch_size
output parameter confirms the number of images processed in the batch. This information is valuable for ensuring that the correct number of images has been handled, especially in batch processing scenarios.
The empty_latent
output parameter provides a latent representation of the processed images. This is particularly useful for advanced image processing tasks that require latent space manipulation, offering a foundation for further creative exploration.
preset
parameter to quickly apply standard dimensions to your images, saving time and ensuring consistency across projects.upscale_factor
and prescale_factor
to achieve the desired image quality and resolution, especially when preparing images for high-resolution displays or prints.swap_dimensions
option to easily change the orientation of your images, which can be particularly helpful when adapting content for different aspect ratios.size_util.SIZE_LIST
.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.