Resolution Selector
Stop hard-coding 1024x1024 all over your graph
- width
- height
Every serious ComfyUI workflow ends up with the same itch: you want to change the output size, and "changing" means hunting down the Empty Latent Image node and retyping 1024x1024. Do it across three subgraphs and you've spent a minute and guaranteed at least one mismatch. HYBS_ResolutionSelector is the small, dumb fix - one dropdown, two integer outputs, done.
It's a "resolution as a value" node, the same idea as the resolution selectors in Impact Pack or any number of packs, but scoped to this one's config file. You pick a preset and get clean width and height ints out. Wire those into Empty Latent Image (or anything that takes a size - latent upscale, resize nodes) and the resolution lives in exactly one place: the dropdown. Change the combo once and every downstream node agrees, because they're all reading the same two wires.
How it works
On startup the node loads config/resolution_combos.json from the pack directory and builds the dropdown from it. Each entry is a [width, height] integer pair, and the dropdown label is the familiar <width>x<height> format. If the file is missing, it falls back to a built-in default list that covers the usual square, portrait, and landscape ratios from 512 up to 2048 - 63-ish combos, enough that most people never touch the JSON.
The one input, resolution (a COMBO), is the only thing you'll set. Outputs are exactly two:
- width (
INT) - height (
INT)
That's the whole surface area. Nothing else to configure, no model state, no backend complexity.
Configuration
Want your own set? Create the file with a non-empty array of integer pairs:
[
[1024, 1024],
[1152, 896],
[896, 1152]
]
The loader validates the shape strictly - it must be a non-empty list of [int, int] pairs, or it raises a ValueError that surfaces in the UI. The example file in config/ shows the full layout.
One gotcha worth knowing: the dropdown options are built once, at schema build time - i.e. when ComfyUI starts. Edit the JSON mid-session and the dropdown won't refresh until you restart. If you need a selector that picks up file edits live and re-runs automatically, the pack also ships Random Resolution Selector, which reloads the JSON on every execution (see that node's page).
Installation
Standard pack install, and it's dependency-light - this node itself needs nothing beyond ComfyUI:
cd path/to/ComfyUI/custom_nodes
git clone https://github.com/hybskgks28275/ComfyUI-hybs-nodes.git
pip install -r ComfyUI-hybs-nodes/requirements.txt
Or search "ComfyUI-hybs-nodes" in ComfyUI Manager and restart. No models, no weights, no CUDA requirements - the pack's only pip dependency is toml, which is for a different node (Conditional LoRA Loader), not this one.
Honestly, if you run one resolution consistently you don't need this. It earns its keep in workflows where the size is a parameter you change between runs - comparison grids, reframing tests, clients who want "can we see it taller" without you editing five nodes. Drop it in, wire the two ints once, and forget it.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| resolution | COMBO | Resolution pair loaded from config/resolution_combos.json. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| width | INT | Width of the selected resolution. |
| height | INT | Height of the selected resolution. |