ComfyUI > Nodes > D2 Nodes ComfyUI > D2 Image Resize

ComfyUI Node: D2 Image Resize

Class Name

D2 Image Resize

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 Image Resize Description

Efficiently resize images with flexibility, maintaining quality and supporting various resampling methods and upscaling options.

D2 Image Resize:

The D2 Image Resize node is designed to adjust the dimensions of images efficiently, providing flexibility in how images are scaled or resized. This node is particularly useful for AI artists who need to prepare images for various applications, ensuring that the images meet specific size requirements without losing quality. By leveraging the resizing capabilities from the WAS Node Suite, this node offers a robust solution for image manipulation, allowing you to either rescale images by a factor or resize them to specific dimensions. The node supports different resampling methods to maintain image quality and offers options for using advanced models for upscaling. Its primary goal is to provide a seamless and effective way to handle image resizing tasks, making it an essential tool for anyone working with digital images in creative projects.

D2 Image Resize Input Parameters:

image

This parameter represents the input image that you want to resize. It is the primary data that the node processes to produce a resized output.

mode

The mode parameter determines the method of resizing. It can be set to either "rescale" or "resize". "Rescale" adjusts the image size by a specified factor, while "resize" changes the image to specific dimensions. This choice impacts how the image is processed and the final output size.

rescale_factor

This parameter is used when the mode is set to "rescale". It defines the factor by which the image will be scaled. The default value is 2.0, with a minimum of 0.1 and a maximum of 16. This factor directly influences the size of the output image.

preset

The preset parameter allows you to select predefined size settings for resizing. It provides a convenient way to apply common size configurations without manually entering dimensions.

resize_width

This parameter specifies the target width for the image when the mode is set to "resize". The default value is 1024, with a range from 1 to 48000. It determines the width of the output image.

resize_height

Similar to resize_width, this parameter sets the target height for the image when using the "resize" mode. The default is 1536, with a range from 1 to 48000, affecting the height of the resized image.

swap_dimensions

A boolean parameter that, when set to true, swaps the width and height of the image. This can be useful for changing the orientation of the image during the resizing process.

round_method

This parameter defines how the dimensions are rounded during resizing. Options include "Floor", "Round", "Ceil", and "None", with "Round" as the default. It affects the precision of the resized dimensions.

upscale_model

This parameter allows you to select an advanced model for upscaling the image. Options include "None" and any available models in the "upscale_models" directory. It enhances the quality of the resized image when upscaling.

resampling

The resampling parameter determines the method used for resizing the image. Options include "lanczos", "nearest", "bilinear", and "bicubic". This choice affects the quality and smoothness of the resized image.

use_tiled_vae

A boolean parameter that, when enabled, uses a tiled approach for encoding the image with a VAE (Variational Autoencoder). This can be beneficial for handling large images or improving processing efficiency.

vae

An optional parameter that allows you to provide a VAE model for encoding the image. This can be used to generate latent representations of the resized image.

D2 Image Resize Output Parameters:

image

The resized image output, which reflects the changes made based on the input parameters. It is the primary result of the node's processing.

width

The width of the resized image, providing information about the final dimensions after processing.

height

The height of the resized image, indicating the final dimensions after resizing.

rescale_factor

The factor by which the image was rescaled, useful for understanding the degree of scaling applied.

latent

A latent representation of the resized image, generated if a VAE model is used. This output can be used for further processing or analysis.

D2 Image Resize Usage Tips:

  • Use the "rescale" mode for proportional resizing when you want to maintain the aspect ratio of the image.
  • Select the "resize" mode when you need the image to fit specific dimensions, such as for print or web display.
  • Experiment with different resampling methods to find the best balance between quality and processing speed for your specific use case.
  • Consider using an upscale model if you need to enlarge images significantly while maintaining quality.

D2 Image Resize Common Errors and Solutions:

"Invalid image dimensions"

  • Explanation: The input image dimensions are not supported by the node.
  • Solution: Ensure that the image dimensions are within the acceptable range specified by the node parameters.

"Unsupported rescale factor"

  • Explanation: The rescale factor provided is outside the allowed range.
  • Solution: Adjust the rescale factor to be within the range of 0.1 to 16.

"Preset not found"

  • Explanation: The selected preset does not exist in the available options.
  • Solution: Verify the preset name and ensure it is included in the available size configurations.

D2 Image Resize 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.