Visit ComfyUI Online for ready-to-use ComfyUI environment
Scale latent images by ratio for precise size adjustments, maintaining aspect ratio and image quality.
The DF_Latent_Scale_by_ratio
node is designed to scale latent images by a specified ratio, allowing you to adjust the size of your latent representations with precision. This node is particularly useful for AI artists who need to upscale or downscale their latent images while maintaining the aspect ratio. By leveraging various scaling methods and cropping options, this node ensures that the resized latent images retain their quality and essential features. The primary goal of this node is to provide a flexible and efficient way to modify the dimensions of latent images, making it an essential tool for image processing and enhancement tasks.
This parameter represents the latent image that you want to scale. It is the core input for the node and contains the data that will be resized according to the specified ratio. The latent image should be in a format compatible with the node's processing functions.
The modifier
parameter is a float value that determines the scaling ratio for the latent image. It multiplies the original dimensions of the latent image to achieve the desired size. For example, a modifier of 0.5 will reduce the size by half, while a modifier of 2.0 will double the size. The minimum value for this parameter is 0, allowing for a wide range of scaling options.
The scale_method
parameter allows you to choose the method used for scaling the latent image. Available options include "nearest-exact", "bilinear", "bicubic", "bislerp", "area", and "lanczos". Each method offers different trade-offs between speed and quality, enabling you to select the most appropriate method for your specific needs.
The crop
parameter specifies how the latent image should be cropped after scaling. Options include "disabled" and "center". When cropping is disabled, the entire scaled image is retained. When center cropping is selected, the image is cropped to maintain the central portion, which can be useful for focusing on the most important areas of the image.
The output of the DF_Latent_Scale_by_ratio
node is a scaled latent image. This output retains the essential features of the original latent image but with modified dimensions as specified by the input parameters. The scaled latent image can be used in subsequent processing steps or for final output, depending on your workflow.
modifier
parameter to experiment with different scaling ratios and find the optimal size for your latent images. Small adjustments can significantly impact the final output.modifier
parameter must be a float value greater than or equal to 0.modifier
value is set correctly and within the valid range.scale_method
parameter must be one of the predefined options: "nearest-exact", "bilinear", "bicubic", "bislerp", "area", or "lanczos".scale_method
value is set to one of the supported options.crop
parameter must be either "disabled" or "center".crop
value is correctly set to one of the valid options.© Copyright 2024 RunComfy. All Rights Reserved.