Olm Resolution Picker:
The OlmResolutionPicker node is a utility designed to streamline the process of selecting and managing image resolutions within the ComfyUI environment. Its primary function is to allow users to specify desired image dimensions, either by selecting from predefined options or by entering custom values. This node is particularly beneficial for AI artists who need to ensure their images conform to specific size requirements, as it automatically adjusts dimensions to be divisible by a specified number, ensuring compatibility with various processing constraints. The node also offers features such as dimension swapping and preview options, enhancing its flexibility and usability. By providing a straightforward interface for resolution management, the OlmResolutionPicker helps users maintain consistency and quality in their digital artwork.
Olm Resolution Picker Input Parameters:
resolution
This parameter allows you to select the desired resolution for your image. You can choose from predefined options or specify a custom resolution. If you opt for a custom resolution, the node will ensure that the dimensions are adjusted to be divisible by a specified number, which is crucial for compatibility with certain processing requirements. The default resolution is 1024x1024, but you can customize it to suit your needs.
draw_preview
This boolean parameter determines whether a preview of the selected resolution should be drawn. When set to True, it provides a visual representation of the resolution, helping you to better understand how the final image will appear. The default value is True.
show_checker
This boolean parameter controls whether a checkerboard pattern is displayed in the background of the preview. This can be useful for visualizing transparency in images. The default value is False.
show_image
This boolean parameter specifies whether the actual image should be displayed in the preview. Enabling this option allows you to see how the image fits within the selected resolution. The default value is False.
swap_dimensions
This boolean parameter allows you to swap the width and height of the selected resolution. This can be particularly useful if you need to quickly change the orientation of your image from landscape to portrait or vice versa. The default value is False.
custom_width
This integer parameter lets you specify a custom width for your image when using the custom resolution option. The width will be adjusted to be divisible by the specified number, ensuring compatibility with processing requirements. The minimum value is 64, the maximum is 8192, and the default is 512.
custom_height
This integer parameter allows you to specify a custom height for your image when using the custom resolution option. Similar to custom_width, the height will be adjusted to be divisible by the specified number. The minimum value is 64, the maximum is 8192, and the default is 512.
divisible_by
This parameter provides a list of options to specify the number by which the custom width and height should be divisible. This ensures that the dimensions are compatible with certain processing constraints. The available options are 1, 2, 4, 8, 16, 32, and 64, with the default being 64.
Olm Resolution Picker Output Parameters:
width
This output parameter represents the final width of the image after processing by the node. It reflects any adjustments made to ensure the width is divisible by the specified number and within the allowed range. This value is crucial for ensuring that the image meets the desired specifications and is compatible with further processing.
height
This output parameter indicates the final height of the image after processing. Like the width, it is adjusted to be divisible by the specified number and within the permissible range. This ensures that the image's dimensions are suitable for the intended use and processing requirements.
Olm Resolution Picker Usage Tips:
- When using custom resolutions, ensure that the
divisible_byparameter is set to a value that aligns with your processing needs to avoid compatibility issues. - Utilize the
swap_dimensionsfeature to quickly change the orientation of your image without manually adjusting the width and height.
Olm Resolution Picker Common Errors and Solutions:
Failed to parse resolution
- Explanation: This error occurs when the resolution string provided cannot be parsed into valid width and height values.
- Solution: Ensure that the resolution string is formatted correctly, such as
1024x768, and does not contain any invalid characters or spaces.
Resolution file missing
- Explanation: This error indicates that the node could not find the resolutions file, which contains predefined resolution options.
- Solution: Verify that the resolutions file exists in the specified directory and is accessible. If missing, recreate the file with the necessary resolution entries.
