ComfyUI > Nodes > D2 Nodes ComfyUI > D2 Size Slector

ComfyUI Node: D2 Size Slector

Class Name

D2 Size Slector

Category
D2
Author
da2el-ai (Account age: 713days)
Extension
D2 Nodes ComfyUI
Latest Updated
2025-05-04
Github Stars
0.03K

How to Install D2 Nodes ComfyUI

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

D2 Size Slector Description

Facilitates image size selection and manipulation in ComfyUI for AI artists, offering flexibility and efficiency.

D2 Size Slector:

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.

D2 Size Slector Input Parameters:

preset

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.

width

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.

height

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.

swap_dimensions

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.

upscale_factor

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.

prescale_factor

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.

round_method

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.

batch_size

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.

images

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.

D2 Size Slector Output Parameters:

width

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.

height

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.

upscale_factor

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.

prescale_factor

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.

batch_size

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.

empty_latent

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.

D2 Size Slector Usage Tips:

  • Utilize the preset parameter to quickly apply standard dimensions to your images, saving time and ensuring consistency across projects.
  • Experiment with the upscale_factor and prescale_factor to achieve the desired image quality and resolution, especially when preparing images for high-resolution displays or prints.
  • Use the swap_dimensions option to easily change the orientation of your images, which can be particularly helpful when adapting content for different aspect ratios.

D2 Size Slector Common Errors and Solutions:

Image dimensions out of range

  • Explanation: The specified width or height is outside the allowable range of 64 to 8192 pixels.
  • Solution: Adjust the width and height parameters to fall within the valid range.

Invalid preset selection

  • Explanation: The chosen preset is not available in the size_util.SIZE_LIST.
  • Solution: Verify that the preset name is correct and exists in the list of available presets.

Batch size exceeds limit

  • Explanation: The specified batch size is greater than the maximum allowed value of 64.
  • Solution: Reduce the batch size to 64 or fewer images to proceed with processing.

D2 Size Slector Related Nodes

Go back to the extension to check out more related nodes.
D2 Nodes ComfyUI
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 Playground, enabling artists to harness the latest AI tools to create incredible art.