ComfyUI > Nodes > DJZ-Nodes > Image Size Adjuster V3

ComfyUI Node: Image Size Adjuster V3

Class Name

ImageSizeAdjusterV3

Category
DJZ-Nodes
Author
DriftJohnson (Account age: 4052days)
Extension
DJZ-Nodes
Latest Updated
2025-04-25
Github Stars
0.04K

How to Install DJZ-Nodes

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

Intelligently resize images while maintaining aspect ratio and quality for AI model preparation.

Image Size Adjuster V3:

The ImageSizeAdjusterV3 node is designed to intelligently adjust the dimensions of an image to meet specific requirements while maintaining its aspect ratio and quality. This node is particularly useful for AI artists who need to prepare images for different model types, such as SD, SDXL, and Cascade, by resizing them to fit within predefined pixel limits. The node offers flexibility by allowing you to specify parameters like downscale factors, rounding methods, and maximum dimensions, ensuring that the resized image meets your exact needs. Additionally, it provides options to preserve the original dimensions or force the image into a square shape, making it a versatile tool for various image processing tasks. By using this node, you can efficiently manage image sizes, optimize them for different AI models, and ensure that they are ready for further processing or analysis.

Image Size Adjuster V3 Input Parameters:

image

The image parameter represents the input image that you want to resize. It is crucial as it serves as the base for all resizing operations performed by the node. The image should be in a format that the node can process, typically a multi-dimensional array representing pixel data.

model_type

The model_type parameter specifies the type of model for which the image is being prepared. It influences the target pixel count for resizing. Options include 'SD', 'SDXL', and 'Cascade', each corresponding to different pixel dimensions. Choosing the correct model type ensures that the image is resized appropriately for the intended model.

downscale_factor

The downscale_factor parameter determines the factor by which the image dimensions should be divisible. This ensures that the resized image dimensions are compatible with certain processing requirements. It is a crucial parameter for maintaining the integrity of the image during resizing.

rounding_method

The rounding_method parameter dictates how the node should handle rounding when adjusting image dimensions. This can affect the final size of the image and is important for achieving precise control over the resizing process.

preserve_original

The preserve_original parameter is a boolean that, when set to true, attempts to maintain the original dimensions of the image as closely as possible. This is useful when you want to resize the image but still keep its original aspect ratio intact.

force_square

The force_square parameter, when enabled, forces the image to be resized into a square shape. This is particularly useful for applications that require square images, ensuring that the output meets specific format requirements.

scaling_factor

The scaling_factor parameter allows you to scale the target pixel count by a specific factor. This provides additional control over the resizing process, enabling you to increase or decrease the size of the image based on your needs. The default value is 1.0, meaning no additional scaling is applied.

max_width

The max_width parameter sets the maximum allowable width for the resized image. It ensures that the image does not exceed a certain width, which is important for maintaining compatibility with specific applications or models. The default maximum width is 2048 pixels.

max_height

The max_height parameter sets the maximum allowable height for the resized image. Similar to max_width, it ensures that the image does not exceed a certain height, maintaining compatibility with specific applications or models. The default maximum height is 2048 pixels.

Image Size Adjuster V3 Output Parameters:

adjusted_width

The adjusted_width parameter represents the final width of the resized image. It is calculated based on the input parameters and ensures that the image meets the specified requirements while maintaining its aspect ratio.

adjusted_height

The adjusted_height parameter represents the final height of the resized image. Like adjusted_width, it is determined by the input parameters and ensures that the image is resized correctly.

applied_scale

The applied_scale parameter indicates the scale factor that was applied to the original image to achieve the resized dimensions. This value is useful for understanding how much the image was scaled during the resizing process.

original_width

The original_width parameter provides the width of the input image before any resizing was applied. It is useful for reference and comparison with the adjusted dimensions.

original_height

The original_height parameter provides the height of the input image before any resizing was applied. It serves as a reference point for understanding the changes made to the image dimensions.

Image Size Adjuster V3 Usage Tips:

  • To maintain the original aspect ratio of your image while resizing, ensure that the preserve_original parameter is set to true.
  • Use the force_square parameter when you need to prepare images for applications that require square dimensions, such as certain social media platforms.
  • Adjust the scaling_factor to fine-tune the size of your image, especially when preparing images for models with specific pixel requirements.
  • Set appropriate max_width and max_height values to prevent your images from exceeding the dimensions supported by your target application or model.

Image Size Adjuster V3 Common Errors and Solutions:

Invalid model_type specified

  • Explanation: The model_type parameter was set to a value that is not recognized by the node.
  • Solution: Ensure that the model_type is set to one of the supported options: 'SD', 'SDXL', or 'Cascade'.

Image dimensions exceed maximum limits

  • Explanation: The resized image dimensions exceed the specified max_width or max_height.
  • Solution: Adjust the max_width and max_height parameters to accommodate larger dimensions or reduce the scaling factor to fit within the limits.

Downscale factor not compatible

  • Explanation: The downscale_factor is not a divisor of the calculated dimensions, leading to rounding issues.
  • Solution: Choose a downscale_factor that is compatible with the desired dimensions or adjust the rounding method to better handle the discrepancy.

Image Size Adjuster V3 Related Nodes

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