ComfyUI  >  Nodes  >  Derfuu_ComfyUI_ModdedNodes >  Image scale by ratio

ComfyUI Node: Image scale by ratio

Class Name

DF_Image_scale_by_ratio

Category
Derfuu_Nodes/Modded nodes/Image
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

Image scale by ratio Description

Upscale images by specified ratio while maintaining aspect ratio, useful for AI artists, various upscale methods, cropping options.

Image scale by ratio:

The DF_Image_scale_by_ratio node is designed to upscale images by a specified ratio, allowing you to enhance the resolution of your images while maintaining their aspect ratio. This node is particularly useful for AI artists who need to increase the size of their images for higher quality outputs or for specific use cases where larger image dimensions are required. By leveraging various upscale methods, this node ensures that the upscaled images retain their visual quality and details. The node also provides options for cropping, giving you control over how the image is resized and ensuring that the important parts of the image are preserved.

Image scale by ratio Input Parameters:

image

This parameter accepts the image you want to upscale. The image should be in a compatible format that the node can process.

upscale_by

This parameter determines the ratio by which the image will be upscaled. It is a floating-point value with a default of 1.0, a minimum of 0.01, and a maximum of 8.0. Adjusting this value will directly impact the final dimensions of the upscaled image.

upscale_method

This parameter allows you to choose the method used for upscaling the image. The available options are "nearest-exact", "bilinear", "area", "bicubic", and "lanczos". Each method has its own characteristics in terms of quality and processing time, so you can select the one that best suits your needs.

crop

This parameter specifies how the image should be cropped during the upscaling process. The available options are "disabled" and "center". Choosing "disabled" will upscale the entire image, while "center" will focus on the central part of the image, potentially cropping the edges.

Image scale by ratio Output Parameters:

IMAGE

The output is the upscaled image. This image will have increased dimensions based on the specified upscale ratio and method, and it will be returned in a format that can be further processed or saved.

Image scale by ratio Usage Tips:

  • To achieve the best quality for detailed images, consider using the "lanczos" upscale method, as it provides high-quality results with minimal artifacts.
  • If you want to maintain the entire image without cropping, set the crop parameter to "disabled".
  • For faster processing times, especially with larger images, the "bilinear" or "area" methods can be more efficient while still providing good quality.

Image scale by ratio Common Errors and Solutions:

Image format not supported

  • Explanation: The input image is in a format that the node cannot process.
  • Solution: Ensure that the image is in a compatible format, such as PNG or JPEG, before inputting it into the node.

Invalid upscale ratio

  • Explanation: The upscale_by parameter is set to a value outside the allowed range.
  • Solution: Adjust the upscale_by value to be within the range of 0.01 to 8.0.

Unsupported upscale method

  • Explanation: The upscale_method parameter is set to a value that is not recognized.
  • Solution: Choose one of the supported methods: "nearest-exact", "bilinear", "area", "bicubic", or "lanczos".

Cropping method not recognized

  • Explanation: The crop parameter is set to an unrecognized value.
  • Solution: Set the crop parameter to either "disabled" or "center".

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