ComfyUI > Nodes > ComfyUI SKBundle > Advanced Aspect Ratio

ComfyUI Node: Advanced Aspect Ratio

Class Name

AspectRatioAdvanced

Category
SKB/display
Author
SKBv0 (Account age: 1879days)
Extension
ComfyUI SKBundle
Latest Updated
2025-04-20
Github Stars
0.04K

How to Install ComfyUI SKBundle

Install this extension via the ComfyUI Manager by searching for ComfyUI SKBundle
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI SKBundle 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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Advanced Aspect Ratio Description

Enhanced aspect ratio control for AI art projects, precise validation, error prevention, consistency assurance.

Advanced Aspect Ratio:

The AspectRatioAdvanced node is designed to provide enhanced control over the aspect ratio settings in your AI art projects. This node allows you to specify and validate aspect ratios, ensuring that your images or videos maintain the desired proportions. By offering advanced validation mechanisms, it helps prevent errors related to incorrect aspect ratio formats or values that fall outside acceptable bounds. This node is particularly beneficial for artists who need precise control over the visual dimensions of their work, ensuring consistency and adherence to specific aspect ratio requirements.

Advanced Aspect Ratio Input Parameters:

aspect_ratio

The aspect_ratio parameter allows you to specify the desired aspect ratio for your project in the format X:Y, such as 16:9 or 4:3. This parameter is crucial as it determines the proportional relationship between the width and height of your output. The aspect ratio must be a valid string containing two numbers separated by a colon. It is important to ensure that the aspect ratio falls within the acceptable range defined by the minimum and maximum ratios to avoid errors. This parameter does not have a default value and must be specified by the user.

minimum_ratio

The minimum_ratio parameter defines the lower bound for the aspect ratio, ensuring that the specified aspect ratio does not fall below this value. This parameter is essential for maintaining the integrity of your project's visual dimensions, preventing overly narrow or wide outputs. The minimum ratio is a float value, and its specific value should be set according to the requirements of your project.

maximum_ratio

The maximum_ratio parameter sets the upper limit for the aspect ratio, ensuring that the specified aspect ratio does not exceed this value. This parameter helps maintain the desired proportions of your output, preventing distortions that could occur with excessively large aspect ratios. Like the minimum ratio, the maximum ratio is a float value and should be configured based on your project's needs.

minimum_ratio_str

The minimum_ratio_str parameter provides a string representation of the minimum aspect ratio, which is used for error messaging and validation purposes. This parameter helps communicate the acceptable range to the user in a more understandable format, especially when errors occur.

maximum_ratio_str

The maximum_ratio_str parameter offers a string representation of the maximum aspect ratio, similar to the minimum_ratio_str. It is used in error messages to clearly convey the upper limit of the acceptable aspect ratio range to the user.

Advanced Aspect Ratio Output Parameters:

aspect_ratio

The output aspect_ratio is the validated and possibly adjusted aspect ratio that meets the specified constraints. This output ensures that the aspect ratio used in your project is both valid and within the defined bounds, providing a reliable basis for generating images or videos with the desired proportions.

Advanced Aspect Ratio Usage Tips:

  • Always ensure that the aspect_ratio is specified in the correct X:Y format to avoid validation errors.
  • Set the minimum_ratio and maximum_ratio parameters according to the specific requirements of your project to maintain the desired visual proportions.
  • Use the minimum_ratio_str and maximum_ratio_str to provide clear error messages, helping you quickly identify and correct any issues with the aspect ratio.

Advanced Aspect Ratio Common Errors and Solutions:

Aspect ratio must be in the format X:Y, such as 16:9, but was {aspect_ratio}.

  • Explanation: This error occurs when the aspect ratio is not provided in the correct X:Y format.
  • Solution: Ensure that the aspect ratio is specified as two numbers separated by a colon, such as 16:9.

Aspect ratio cannot reduce to any less than {minimum_ratio_str} ({minimum_ratio}), but was {aspect_ratio} ({calculated_ratio}).

  • Explanation: The specified aspect ratio is below the minimum allowed value.
  • Solution: Adjust the aspect ratio to be equal to or greater than the specified minimum ratio.

Aspect ratio cannot reduce to any greater than {maximum_ratio_str} ({maximum_ratio}), but was {aspect_ratio} ({calculated_ratio}).

  • Explanation: The specified aspect ratio exceeds the maximum allowed value.
  • Solution: Modify the aspect ratio to be equal to or less than the specified maximum ratio.

Advanced Aspect Ratio Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI SKBundle
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.