Adjusted Resolution
One node that computes both your base and upscaled resolution
- Width
- Height
- Upscaled Width
- Upscaled Height
- Batch
Resolution alignment is one of those background chores that quietly wastes more time than it deserves. Your sampler wants dimensions on a 16-pixel grid, your upscale pass wants the base size scaled by a factor and re-rounded, and if you get either rounding wrong you get a cryptic error from an Empty Latent node three nodes away. UC_AdjustedResolutionParameters is the pack's answer: type in a width, height, and scale, and it hands you both the aligned base dimensions and the aligned upscaled dimensions, plus the batch size - five INT outputs, one calculation.
What it does
Inputs are width, height (both default 1024, 16–16384), batch_size, scale_by (default 1.0), and multiple (default 16, the grid to round to). Outputs:
- Width / Height - your base resolution, rounded to the nearest
multiple. - Upscaled Width / Upscaled Height -
width × scale_by(andheight × scale_by), again rounded to the nearestmultiple. - Batch - passed through unchanged.
The neat part is what it prevents. In a classic hires-fix or upscale workflow you'd hardcode "1024×1024 → 1536×1536" and then rebuild the graph every time you change the base size. Here you change one width and both the Empty Latent and the upscale step track automatically. And because the outputs are separate INTs, you can wire them anywhere - into an Empty Latent node, into a resolution picker, into a text field - without a calculator.
The rounding behavior is worth a beat: multiple defaults to 16, which matches what ComfyUI's latent nodes expect, but it's a free parameter (4–128 in steps of 4). If you're feeding a model that wants 64-aligned inputs, set it once and every downstream number stays aligned. One honest note: rounding is to the nearest multiple, so an odd scale_by can drift your upscaled size by up to half a multiple - usually invisible, but it's there.
Install
Via ComfyUI Manager (search ComfyUI-UtilsCollection) or:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection
Restart. Deps are just opencv-python and typing-extensions.
When you'd reach for it
Any workflow where the base resolution and the upscaled resolution should stay in lockstep - hires-fix pipelines, detail passes, batch scripts that vary size per run. It's the kind of node you install, use for a week, and then wonder how you survived typing "1536" into three separate places by hand. It replaces nothing flashy; it just removes arithmetic from your graph.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 102416–16384 | — |
| height | INT | 102416–16384 | — |
| batch_size | INT | 11–4096 | — |
| scale_by | FLOAT | 1.000–10 | Scale used for the larger output resolution. |
| multiple | INT | 164–128 | Round the larger resolution to this pixel multiple. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| Width | INT | — |
| Height | INT | — |
| Upscaled Width | INT | — |
| Upscaled Height | INT | — |
| Batch | INT | — |