ComfyUI Extension: Olm Resolution Picker for ComfyUI
A smart, customizable resolution selector node with live aspect ratio preview, image overlays, and checkerboard support β cleanly parsed from a human-readable text file.
Custom Nodes (0)
README
Olm Resolution Picker for ComfyUI
The Olm Resolution Picker is a lightweight, customizable resolution selector node for ComfyUI.
It allows you to define your preferred image resolutions using a simple resolutions.txt
file β making it future-proof, editable, and great for organized workflows.
This node is built for users who want more than just a few hardcoded presets, or who don't want to have a huge node pack just to get a resolution selector. Whether you're targeting SDXL aspect ratios, cinematic dimensions, or mobile previews, this node makes resolution management intuitive and scalable.
β¨ Features
-
π User-editable
resolutions.txt
for full control -
π’ Outputs resolution as
width
andheight
integers -
π§ Supports labels (e.g.,
768x1344: vertical (9:16)
) -
β Allows group headers using
-- Header:
syntax -
π§© Aspect Ratio Visualization: Optionally toggle a preview image to better understand image composition and framing at a given resolution
-
βοΈ Checkerboard Overlay: Helps visually estimate scale β tile size remains constant regardless of resolution, giving a quick sense of dimensions
-
πΌοΈ Replaceable Preview Image: Swap test_image.png in the nodeβs JS directory to use your own visual reference
-
β Skips invalid lines or malformed input automatically
-
π‘οΈ Built-in fallback resolution to prevent broken graph evaluation
Installation
-
Clone this repository to your ComfyUI/custom_nodes folder.
-
Check/install dependencies.
Most likely you don't need to do this:
You should already have all of the dependencies installed if you have ComfyUI up and running. Remember to always active the virtual environment (venv) before installing anything.
pip install -r requirements.txt
Your folder structure should look like:
ComfyUI/
βββ custom_nodes/
βββββ ComfyUI-Olm-Resolution-Picker/
βββββ init.py
βββββ olm_resolution_picker.py
βββββ resolutions.txt
Restart ComfyUI after installation.
Usage
- Add the Olm Resolution Picker node in your ComfyUI graph.
- Pick a resolution from the dropdown, toggle visualizations on/off.
- Define resolutions in the
resolutions.txt
file (see example below). - The selected resolution is returned as
width
andheight
(INT, INT). - Safe fallback to
1024x1024
if the selection is invalid or a header is selected.
How the resolutions.txt Configuration Works
Have a resolutions.txt
file in the same folder as the node.
I have provided an example/default file.
The format is following:
// First comment
-- SDXL
1024x1024: square (1:1)
768x1344: vertical (9:16)
// Second comment
-- Cinematic
1536x640: landscape (12:5)
1564x670: cinematic (21:9)
- Each entry becomes selectable in a dropdown.
- The node parses only valid
WxH
resolutions and ignores malformed entries. - A resolution entry is defined by
[width number][x][height number]
. - Labels after
:
are shown in the UI but ignored for output. - Use
--
to add a header. - Use
//
for comments, these are not shown anywhere.
Customizing the Test Image
The preview panel includes a small test image to help visualize the selected aspect ratio and cropping.
If you'd like to use your own image:
- Locate the
test_image.png
file inside thejs/
folder of this node's directory. - Replace it with any image of your choice (a
.png
file as it's hard-coded). - The preview area assumes a 4:3 aspect ratio (e.g., 1024x768), so images that match this ratio will display best without blank areas.
Parameters
| Name | Type | Description |
|-----------------|---------------|----------------------------------|
| resolution
| Choice | Resolution string from dropdown |
| show_checker
| Bool | Optional frontend toggle |
| show_image
| Bool | Optional frontend toggle |
| Output
| (INT, INT)
| Width and height integers |
Notes
This is a personal learning project (v1), created to explore custom node development in ComfyUI. While I took care to ensure it functions properly and it has functioned fine in my own use, there may still be bugs, rough edges, or unexpected behavior - so use with caution.
Feedback is welcome! Feel free to open an issue if you encounter a problem or have suggestions or ideas to improve the node.
Author
Created by @o-l-l-i