H3 Final Size - SatoDive
3840×2160, exactly, after the fact — one node, four jobs
- image
- image
- width
- height
The pack's philosophy is "no hidden passes", so the last step is an explicit one you add yourself. H3 Final Size takes a finished image and puts it at the resolution you actually need - a print size, a wallpaper, a social crop - with an optional upscale model in front for genuine detail.
Four modes, and they're genuinely different jobs:
- Exact size -
width×height, hitting the number dead on. - Scale by factor - multiply the current dimensions by 0.1–8.
- Target megapixels - give it an area and it keeps the aspect ratio.
- Keep size (detail only) - the resolution doesn't change; you just get a sharper version of what you had.
How it works
Everything is a single resize at the end, preceded by an optional ESRGAN-style pass if upscale_model isn't None. Resampling method defaults to lanczos (the others are bicubic, bilinear, area) - Lanczos is the right default for downscaling and fine for moderate upscales.
The one mode people don't expect is Keep size (detail only). It upscales with the model, shrinks the result back to the original resolution with area filtering, then blends that against the original by detail_strength (default 0.7, where 0 is untouched and 1 is the full effect). It's supersampling: the model's edges and textures get averaged down into the pixels you already have. No new resolution, just crisper. Same helper backs the detail_model option in H3 Image (Simple).
Exact size has a fit control for when your aspect ratio doesn't match: stretch distorts, crop center-crops the overflow, pad scales to fit and letterboxes onto a black canvas. crop is the default, which is the right answer for screens and wallpapers and the wrong one for a composition where the edges matter.
Inputs and outputs
image in, plus mode, width, height (defaults 3840×2160), factor (2.0), megapixels (8.0), fit, method, upscale_model, detail_strength. Out comes image, width and height - the real numbers after the resize, which is exactly what you want to feed a filename or a note node so your exports are labelled correctly.
Worth wiring: the width/height outputs of H3 Image (Simple) or this pack's size nodes, if you want the final size to follow the generation size rather than fight it.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/SatoDive/ComfyUI-H3-IMG-Gen-SatoDive
ComfyUI Manager → ComfyUI-H3-IMG-Gen-SatoDive (MiniMax H3 Image Gen - SatoDive), restart. No Python dependencies of its own, but the pack wants a ComfyUI build with the native MiniMax H3 nodes. Drop upscale models in models/upscale_models - that's the folder the upscale_model dropdown reads.
Gotchas
The defaults will crop your image. Drop this node in and run without touching anything and you get a 3840×2160 center crop of whatever came in. It's a legitimate behaviour with a very normal-looking panel, and it's the reason to check mode, fit, width and height before you wire it up. Set mode to Keep size (detail only) or Target megapixels if you don't want the aspect trashed.
upscale_model runs before the resize. A 4× model on a 3 MP still builds a ~48 MP intermediate, and then you resample it down to your target. That's intentional - the extra detail survives the downscale - but it's slow and memory-hungry in one go, and on a modest card it's the thing that swaps models mid-workflow. If you need it, do the upscale stage first at a smaller input size.
Target megapixels measures whatever it's handed. If an upscale model ran first, the aspect ratio is preserved from the upscaled image, not the original - fine, just don't assume it's normalising back to your source dimensions.
Detail-only mode needs a strength above zero. At detail_strength 0 the node returns the image untouched, and at very low values it does approximately nothing. If it looks like a no-op, it probably is.
Method matters most going down. Lanczos is the pick for shrinking; area is the honest one if you want plain box averaging, and bilinear will soften. For upscales, the filter choice is a rounding error next to whether you used an upscale model at all - more pixels and more detail are different problems, and this node can only solve the first honestly.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| mode | COMBO | Exact size | Keep size (detail only): the upscale model adds detail, then the image is shrunk back to its current resolution. |
| width | INT | 384064–16384 | Exact size mode. |
| height | INT | 216064–16384 | Exact size mode. |
| factor | FLOAT | 2.000.1–8 | Scale by factor mode. |
| megapixels | FLOAT | 8.000.25–64 | Target megapixels mode (keeps the aspect ratio). |
| fit | COMBO | crop | Exact size mode when the aspect ratio differs: stretch, crop the overflow, or pad with black. |
| method | COMBO | lanczos | 4 options: lanczos, bicubic, bilinear, area |
| upscale_model | COMBO | Optional ESRGAN-style model applied first (real detail). The result is then resized to your chosen size. | |
| detail_strength | FLOAT | 0.700–1 | Keep size (detail only) mode: how much of the detail pass is mixed in. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| width | INT | — |
| height | INT | — |