ComfyUI > Nodes > Recommended Resolution Calculator > Recommended Resolution Calculator

ComfyUI Node: Recommended Resolution Calculator

Class Name

RecommendedResCalc

Category
utils
Author
marhensa (Account age: 4784days)
Extension
Recommended Resolution Calculator
Latest Updated
2024-05-22
Github Stars
0.05K

How to Install Recommended Resolution Calculator

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

Recommended Resolution Calculator Description

Calculate optimal image resolution based on predefined aspect ratios for AI artists using Stable Diffusion models to enhance image quality and consistency.

The RecommendedResCalc node is designed to help you determine the optimal resolution for your images based on predefined aspect ratios. This node is particularly useful for AI artists working with Stable Diffusion models, as it ensures that the generated images adhere to recommended dimensions, thereby enhancing the quality and consistency of the output. By calculating the closest accepted aspect ratio to your desired dimensions, the node adjusts the width and height of your images to fit within these optimal parameters. This not only helps in maintaining the aspect ratio but also in achieving better visual results.

desiredXSIZE

This parameter represents the desired width of the image you want to generate. It is a crucial input as it helps in calculating the aspect ratio and finding the closest accepted resolution. The value should be a positive integer representing the width in pixels. There are no strict minimum or maximum values, but it should be within a reasonable range for image generation tasks.

desiredYSIZE

This parameter represents the desired height of the image you want to generate. Similar to desiredXSIZE, it is essential for calculating the aspect ratio and determining the closest accepted resolution. The value should be a positive integer representing the height in pixels. There are no strict minimum or maximum values, but it should be within a reasonable range for image generation tasks.

accepted_XSIZE

This output parameter provides the recommended width for your image based on the closest accepted aspect ratio. It ensures that the width is adjusted to fit within the optimal resolution parameters, enhancing the quality of the generated image.

accepted_YSIZE

This output parameter provides the recommended height for your image based on the closest accepted aspect ratio. It ensures that the height is adjusted to fit within the optimal resolution parameters, enhancing the quality of the generated image.

scaling_factor

This output parameter indicates the scaling factor applied to adjust your desired dimensions to the recommended resolution. It helps in understanding how much the original dimensions were scaled to fit the optimal aspect ratio.

downscalefrom4x_factor

This output parameter provides the factor by which the image dimensions were downscaled from a 4x resolution. It is useful for understanding the level of downscaling applied to achieve the recommended resolution.

downscalefrom2x_factor

This output parameter provides the factor by which the image dimensions were downscaled from a 2x resolution. It is useful for understanding the level of downscaling applied to achieve the recommended resolution.

  • Ensure that the desiredXSIZE and desiredYSIZE parameters are set to values that are within a reasonable range for image generation tasks to get the best results.
  • Use the output parameters accepted_XSIZE and accepted_YSIZE to adjust your image dimensions before feeding them into the Stable Diffusion model for optimal quality.
  • Pay attention to the scaling_factor to understand how much your original dimensions were adjusted. This can help in fine-tuning your input parameters for future tasks.

Invalid input dimensions

  • Explanation: The input dimensions for desiredXSIZE or desiredYSIZE are not positive integers.
  • Solution: Ensure that both desiredXSIZE and desiredYSIZE are set to positive integer values representing the width and height in pixels.

Aspect ratio not found

  • Explanation: The desired aspect ratio does not closely match any of the accepted aspect ratios.
  • Solution: Adjust the desiredXSIZE and desiredYSIZE to values that are closer to standard aspect ratios listed in the accepted ratios.

Scaling factor too high

  • Explanation: The scaling factor calculated is excessively high, indicating a significant adjustment from the original dimensions.
  • Solution: Re-evaluate the input dimensions and try to set them closer to the standard resolutions to minimize the scaling factor.

Recommended Resolution Calculator Related Nodes

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