ComfyUI  >  Nodes  >  Derfuu_ComfyUI_ModdedNodes >  Latent Scale by ratio

ComfyUI Node: Latent Scale by ratio

Class Name

DF_Latent_Scale_by_ratio

Category
Derfuu_Nodes/Modded nodes/Latent
Author
Derfuu (Account age: 1829 days)
Extension
Derfuu_ComfyUI_ModdedNodes
Latest Updated
6/22/2024
Github Stars
0.3K

How to Install Derfuu_ComfyUI_ModdedNodes

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

Latent Scale by ratio Description

Scale latent images by ratio for precise size adjustments, maintaining aspect ratio and image quality.

Latent Scale by ratio:

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.

Latent Scale by ratio Input Parameters:

latent

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.

modifier

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.

scale_method

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.

crop

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.

Latent Scale by ratio Output Parameters:

LATENT

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.

Latent Scale by ratio Usage Tips:

  • To maintain the quality of your latent images, choose a scaling method that balances speed and quality based on your specific requirements. For example, "lanczos" provides high-quality results but may be slower than other methods.
  • Use the 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.
  • When working with images where the central portion is most important, consider using the "center" crop option to ensure that the key features are retained after scaling.

Latent Scale by ratio Common Errors and Solutions:

Invalid modifier value

  • Explanation: The modifier parameter must be a float value greater than or equal to 0.
  • Solution: Ensure that the modifier value is set correctly and within the valid range.

Unsupported scale method

  • Explanation: The scale_method parameter must be one of the predefined options: "nearest-exact", "bilinear", "bicubic", "bislerp", "area", or "lanczos".
  • Solution: Verify that the scale_method value is set to one of the supported options.

Invalid crop option

  • Explanation: The crop parameter must be either "disabled" or "center".
  • Solution: Check that the crop value is correctly set to one of the valid options.

Latent Scale by ratio Related Nodes

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