SamplingParameters
One node that answers 'what size are my tiles?'
- width
- height
- batch_size
- upscaled_width
- upscaled_height
- steps
- cfg
- seed
- tile_width
- tile_height
- tile_padding
Most ComfyUI workflows define width, height, steps, CFG, and seed in five different places, and then you want to upscale the result and suddenly you're computing tile sizes by hand in your head. SamplingParameters is the one-stop node from this pack that makes the base settings a single source of truth and, more usefully, computes the upscaled dimensions and tiled-sampling dimensions for you.
What it gives you
Eight inputs, eleven outputs. The first six inputs are the boring-but-essential set:
width/height(default 1024, snapped tomultiple)batch_sizesteps(default 26) andcfg(default 3.5)seed- an INT with acontrol_after_generatedropdown, same widget that bites everyone once (set "widget control mode" to Before or you'll "lose" seeds)
The interesting pair is scale_by - "How much to upscale initial resolution by for the upscaled one" - and multiple - "Nearest multiple of the result to set the upscaled resolution to." From those, the node computes five derived outputs:
upscaled_width/upscaled_height- base resolution ×scale_by, rounded to the nearestmultipletile_width/tile_height/tile_padding- tile sizes for a tiled second pass
How the tile math works
Straight from the source: if scale_by > 2, tiles are computed as (upscaled − base/scale_by) / scale_by; otherwise tiles are half the upscaled size. tile_padding is max(base dimension) − max(tile dimension). The idea is the standard two-pass upscaling pattern - generate at base res, then tile the upscaled canvas so the second pass runs within VRAM instead of blowing past it (the tiled-diffusion approach the KB's upscaling doc recommends for large outputs on limited cards). Feed the tile outputs into a tile-based upscaler or KSampler (advanced) tiling workflow and you never hand-compute a tile size again.
The trap to watch
The derived numbers are only as good as scale_by and multiple. If you set multiple to 128 and a base dimension of 1000, everything rounds to the nearest 128 - which is usually what you want for diffusion (native multiples) but can surprise you when the numbers don't divide evenly. Also remember the seed's control_after_generate trap above; the seed you see is the one used next run unless you set it to Fixed.
Install
ComfyUI Manager → search ComfyUI_SamplingUtils, or:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI_SamplingUtils
then restart. Real deps from requirements.txt: kornia, scipy, pilgram, opencv-python, unifiedefficientloader>=0.5.0. Pack note: the README declares the pack DEPRECATED in favor of ComfyUI-UtilsCollection - this node is self-contained and stable, but if you're starting fresh, check whether the successor has an equivalent before wiring it deep into a saved workflow.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 102416–16384 | — |
| height | INT | 102416–16384 | — |
| batch_size | INT | 11–4096 | — |
| scale_by | FLOAT | 1.000–10 | How much to upscale initial resolution by for the upscaled one. |
| multiple | INT | 164–128 | Nearest multiple of the result to set the upscaled resolution to. |
| steps | INT | 261–10000 | How many steps to run the sampling for. |
| cfg | FLOAT | 3.50-100–100 | The amount of influence your prompot will have on the final image. |
| seed | INT | -9223372036854776000–9223372036854776000 | — |
Outputs (11)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |
| batch_size | INT | — |
| upscaled_width | INT | — |
| upscaled_height | INT | — |
| steps | INT | — |
| cfg | FLOAT | — |
| seed | INT | — |
| tile_width | INT | — |
| tile_height | INT | — |
| tile_padding | INT | — |