Visit ComfyUI Online for ready-to-use ComfyUI environment
Manage and select predefined aspect ratios for AI art projects with customizable presets and random selection seed.
The PresetRatioSelector
node is designed to help you manage and select predefined aspect ratios for your AI art projects. This node allows you to choose from a list of preset ratios, which can be customized and extended by the user. By leveraging these presets, you can ensure consistency and precision in your artwork dimensions, making it easier to achieve the desired visual effects. The node also supports the use of a seed to randomly select a preset, adding an element of variability and creativity to your work. This functionality is particularly useful for artists who want to experiment with different aspect ratios without manually adjusting settings each time.
This parameter allows you to select a predefined aspect ratio from a list of available presets. The options include various common aspect ratios, and you can also add your own custom presets. The default value is "none", which means no preset is selected. Selecting a preset will automatically adjust the dimensions of your artwork according to the chosen ratio.
This parameter lets you swap the width and height of the selected aspect ratio. It accepts two values: "true" and "false", with the default being "false". Swapping the axis can be useful when you want to quickly change the orientation of your artwork from landscape to portrait or vice versa.
This parameter allows you to choose a latent ratio from a list of predefined sizes. If you select "custom", you can manually specify the width and height using the custom_latent_w
and custom_latent_h
parameters. The default value is the first ratio in the list.
This parameter specifies the custom width for the latent ratio when select_latent_ratio
is set to "custom". It accepts integer values ranging from 0 to 8192, with a default value of 0. This allows you to define a specific width for your custom latent ratio.
This parameter specifies the custom height for the latent ratio when select_latent_ratio
is set to "custom". It accepts integer values ranging from 0 to 8192, with a default value of 0. This allows you to define a specific height for your custom latent ratio.
This parameter allows you to choose a CTE (Content-Aware Transformation Engine) ratio from a list of predefined sizes. If you select "custom", you can manually specify the width and height using the cte_w
and cte_h
parameters. The default value is the first ratio in the list.
This parameter specifies the custom width for the CTE ratio when select_cte_ratio
is set to "custom". It accepts integer values ranging from 0 to 8192, with a default value of 0. This allows you to define a specific width for your custom CTE ratio.
This parameter specifies the custom height for the CTE ratio when select_cte_ratio
is set to "custom". It accepts integer values ranging from 0 to 8192, with a default value of 0. This allows you to define a specific height for your custom CTE ratio.
This parameter is a multiplier for the CTE dimensions. It accepts float values ranging from 0.0 to 100.0, with a default value of 0.0. Applying a multiplier can help you scale the CTE dimensions proportionally.
This parameter specifies the resolution for the CTE dimensions. It accepts integer values ranging from 0 to 8192, with a default value of 0. Setting a resolution can help you achieve a specific level of detail in your artwork.
This parameter allows you to fit the CTE dimensions to a specific size. It accepts integer values ranging from 0 to 8192, with a default value of 0. This can be useful for ensuring that your artwork fits within certain size constraints.
This parameter allows you to choose a target ratio from a list of predefined sizes. If you select "custom", you can manually specify the width and height using the target_w
and target_h
parameters. The default value is the first ratio in the list.
This parameter specifies the custom width for the target ratio when select_target_ratio
is set to "custom". It accepts integer values ranging from 0 to 8192, with a default value of 0. This allows you to define a specific width for your custom target ratio.
This parameter specifies the custom height for the target ratio when select_target_ratio
is set to "custom". It accepts integer values ranging from 0 to 8192, with a default value of 0. This allows you to define a specific height for your custom target ratio.
This parameter is a multiplier for the target dimensions. It accepts float values ranging from 0.0 to 100.0, with a default value of 0.0. Applying a multiplier can help you scale the target dimensions proportionally.
This parameter specifies the width for cropping the final output. It accepts integer values ranging from 0 to 8192, with a default value of 0. Cropping can help you remove unwanted parts of the image and focus on the main subject.
This parameter specifies the height for cropping the final output. It accepts integer values ranging from 0 to 8192, with a default value of 0. Cropping can help you remove unwanted parts of the image and focus on the main subject.
This parameter determines whether to use a seed to randomly select a preset. It accepts two values: "true" and "false", with the default being "false". Using a seed can add an element of randomness and creativity to your artwork by selecting different presets each time.
This parameter specifies the seed value used for random selection of presets. It accepts integer values and is used only when use_preset_seed
is set to "true". The seed ensures that the same preset is selected each time for a given seed value, providing reproducibility.
This optional parameter allows you to specify a unique identifier for the operation. It can be useful for tracking and managing different operations within a project.
This optional parameter allows you to include additional PNG metadata information. It can be useful for embedding extra details or annotations within the image file.
This optional parameter allows you to specify a prompt for the operation. It can be useful for guiding the AI in generating specific content based on the provided prompt.
The output parameter samples
contains the generated latent samples based on the selected or custom aspect ratios. These samples are tensors that represent the dimensions and content of your artwork. The latent samples are crucial for further processing and transformations in your AI art pipeline, providing the foundational structure for your final output.
use_preset_seed
parameter to introduce variability and discover new aspect ratios that might enhance your creative process.swap_axis
parameter to quickly switch between landscape and portrait orientations without manually adjusting dimensions.custom_latent_w
and custom_latent_h
parameters are set to appropriate values to avoid unexpected results.ratio_presets.json
file is missing or not found in the expected directory.ratio_presets.json
file is present in the correct directory. If the file is missing, create it or obtain it from the appropriate source.ratio_presets
key is missing in the JSON file.ratio_presets.json
file contains the ratio_presets
key with the appropriate structure. Update the file if necessary to include the missing key.select_latent_ratio
parameter.select_latent_ratio
is one of the predefined sizes or "custom". Check the available options and select a valid value.© Copyright 2024 RunComfy. All Rights Reserved.