ComfyUI > Nodes > Allor Plugin > ImageTransformResizeRelative

ComfyUI Node: ImageTransformResizeRelative

Class Name

ImageTransformResizeRelative

Category
image/transform
Author
Nourepide (Account age: 2900days)
Extension
Allor Plugin
Latest Updated
2024-05-22
Github Stars
0.2K

How to Install Allor Plugin

Install this extension via the ComfyUI Manager by searching for Allor Plugin
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Allor Plugin 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

ImageTransformResizeRelative Description

Resize images proportionally based on original dimensions using scaling factors for width and height, supporting various interpolation methods.

ImageTransformResizeRelative:

The ImageTransformResizeRelative node is designed to resize images by scaling their width and height relative to their original dimensions. This node is particularly useful when you need to proportionally adjust the size of an image without specifying exact dimensions. By providing scaling factors for both width and height, you can easily enlarge or shrink images while maintaining their aspect ratio. This node supports various interpolation methods to ensure the resized image maintains high quality. It is an essential tool for AI artists looking to manipulate image sizes dynamically and efficiently.

ImageTransformResizeRelative Input Parameters:

images

This parameter expects a list of images that you want to resize. The images should be in a format that the node can process, typically tensors or arrays representing image data.

scale_width

This parameter defines the scaling factor for the width of the image. It is a floating-point number with a default value of 1.0, meaning no change in width. You can adjust this value in steps of 0.1 to either increase or decrease the width of the image proportionally. For example, a value of 1.5 will increase the width by 50%, while a value of 0.5 will reduce it by half.

scale_height

This parameter defines the scaling factor for the height of the image. Similar to scale_width, it is a floating-point number with a default value of 1.0 and can be adjusted in steps of 0.1. This allows you to proportionally increase or decrease the height of the image. For instance, a value of 2.0 will double the height, while a value of 0.8 will reduce it to 80% of the original height.

method

This parameter specifies the interpolation method used for resizing the image. The available options are lanczos, bicubic, hamming, bilinear, box, and nearest. Each method has its own characteristics in terms of quality and performance. For example, lanczos and bicubic are known for high-quality results but may be slower, while nearest is faster but may produce lower quality.

ImageTransformResizeRelative Output Parameters:

IMAGE

The output is a list of resized images. Each image in the list has been scaled according to the specified scale_width and scale_height parameters and resized using the chosen interpolation method. The output images maintain the same format as the input images, ensuring compatibility with subsequent processing nodes.

ImageTransformResizeRelative Usage Tips:

  • To maintain the aspect ratio of an image, use the same value for both scale_width and scale_height.
  • Experiment with different interpolation methods to find the best balance between quality and performance for your specific use case.
  • Use small incremental changes in scale_width and scale_height to fine-tune the size of your images without causing significant distortion.

ImageTransformResizeRelative Common Errors and Solutions:

ValueError: Invalid interpolation method

  • Explanation: This error occurs when an unsupported interpolation method is specified.
  • Solution: Ensure that the method parameter is set to one of the following valid options: lanczos, bicubic, hamming, bilinear, box, or nearest.

IndexError: Image list is empty

  • Explanation: This error occurs when the images parameter is an empty list.
  • Solution: Provide a non-empty list of images to the images parameter.

TypeError: Invalid image format

  • Explanation: This error occurs when the images provided are not in a supported format.
  • Solution: Ensure that the images are in a format that the node can process, typically tensors or arrays representing image data.

ImageTransformResizeRelative Related Nodes

Go back to the extension to check out more related nodes.
Allor Plugin
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.