ComfyUI  >  Nodes  >  JPS Custom Nodes for ComfyUI >  SDXL Recommended Resolution Calc (JPS)

ComfyUI Node: SDXL Recommended Resolution Calc (JPS)

Class Name

SDXL Recommended Resolution Calc (JPS)

Category
JPS Nodes/Math
Author
JPS (Account age: 370 days)
Extension
JPS Custom Nodes for ComfyUI
Latest Updated
5/22/2024
Github Stars
0.0K

How to Install JPS Custom Nodes for ComfyUI

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

SDXL Recommended Resolution Calc (JPS) Description

Calculate optimal image resolution based on target dimensions and predefined aspect ratios for maintaining quality and proportions.

The SDXL Recommended Resolution Calc (JPS) node is designed to help you determine the most suitable resolution for your images based on a target width and height. This node calculates the closest matching resolution from a set of predefined aspect ratios, ensuring that your images maintain their intended quality and proportions. By comparing the target aspect ratio with a list of accepted horizontal, vertical, and square ratios, the node identifies the best match and returns the recommended resolution. This functionality is particularly useful for AI artists who need to optimize their images for various display formats without manually adjusting dimensions.

target_width

The target width parameter specifies the desired width of the image. It is an integer value that represents the width in pixels. The node uses this value to calculate the aspect ratio and find the closest matching resolution. The minimum value is 256, the maximum value is 8192, and the default value is 1024.

target_height

The target height parameter specifies the desired height of the image. It is an integer value that represents the height in pixels. Similar to the target width, this value is used to calculate the aspect ratio and determine the best matching resolution. The minimum value is 256, the maximum value is 8192, and the default value is 1024.

SDXL_width

The SDXL_width parameter represents the recommended width for the image based on the closest matching aspect ratio. This output value is an integer that indicates the width in pixels, ensuring that the image maintains its quality and proportions.

SDXL_height

The SDXL_height parameter represents the recommended height for the image based on the closest matching aspect ratio. This output value is an integer that indicates the height in pixels, ensuring that the image maintains its quality and proportions.

  • To achieve the best results, provide target width and height values that closely match the aspect ratios of your intended display format.
  • Use this node to quickly adjust your image dimensions for different platforms, such as social media, websites, or print, without manually calculating the aspect ratios.

Invalid target width or height

  • Explanation: The target width or height provided is outside the acceptable range (256 to 8192 pixels).
  • Solution: Ensure that the target width and height values are within the specified range and try again.

No matching resolution found

  • Explanation: The node could not find a close enough match for the provided aspect ratio.
  • Solution: Double-check the target width and height values to ensure they are correct. If necessary, adjust the values slightly to find a closer match.

SDXL Recommended Resolution Calc (JPS) Related Nodes

Go back to the extension to check out more related nodes.
JPS Custom Nodes for ComfyUI
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.