JR MiniMax H3 Resolution Scale Calculator
Stop doing upscale math in your head — the H3 resolution calculator
- width
- height
- scale
- actual_megapixels
Every upscale workflow needs the same boring calculation: I have a source at W×H, I want roughly N megapixels while keeping the aspect ratio, and the output has to land on a nice divisible grid. The JR H3 Resolution Scale Calculator is that boring calculation turned into a node, and it's exactly the kind of utility you stop noticing once it's in your graph - until you go back to doing it by hand and immediately miss it.
Feed it source_width and source_height (defaults 768×1152), tell it target_megapixels (default 0.88 - the classic one-pass H3 sweet spot), and it hands back the closest width/height pair, the area-equivalent linear scale, and the actual_megapixels you'll really get. The divisor dropdown (8 / 16 / 32) snaps the result so encoder and latent nodes don't complain about odd dimensions - 32 is the safe default for H3 latent grids. It also accepts old workflow files that saved the divisor as a plain number rather than the string option, so it won't break on legacy graphs.
The aspects
aspect defaults to Source (preserve what came in) with presets for 1:1, 2:3, 3:2, 16:9, and 9:16, plus Custom driven by custom_aspect_width / custom_aspect_height. Want to re-frame a vertical source to 16:9 before upscaling? Set the aspect, and the calculator gives you the target dims to crop into. The four outputs are all plain data - width/height INTs and scale/actual_megapixels FLOATs - so they wire straight into any downstream node that takes numbers, like the RTX Upscaler & Refiner's width/height or an image resize node.
The wiring that makes sense
The README's decode/upscale/save chain slots it right before the RTX stage:
VAE Decode IMAGE → Resolution Scale Calculator → RTX Upscaler & Refiner → Enhanced Video Combine
scale is the area-equivalent linear multiplier - useful if you're feeding a Scale mode that wants a multiplier rather than absolute dimensions.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/Goldlionren/ComfyUI_JR_MiniMaxH3Node
<your-comfyui-python> -m pip install -r ComfyUI_JR_MiniMaxH3Node/requirements.txt
or ComfyUI Manager → search ComfyUI_JR_MiniMaxH3Node. No extra dependencies beyond the pack's single imageio-ffmpeg.
Troubleshooting
- The output dims don't match my source's aspect - you probably left
aspecton a preset instead of Source, ordivisorsnapped it. That's the node doing its job; check which one you intended. - Legacy workflow errors on the divisor - the node deliberately accepts the old numeric 8/16/32 as well as the string dropdown, so if it errors, the value really isn't valid.
- Scale looks too big/small - remember
scaleis linear, so it's the area that scales by the square. For ~2× the pixels you want ascalenear 1.41, not 2.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| source_width | INT | 7681–16384 | — |
| source_height | INT | 11521–16384 | — |
| target_megapixels | FLOAT | 0.880.001–256 | — |
| aspect | COMBO | Source | 7 options: Source, 1:1, 2:3, 3:2, 16:9, 9:16, +1 |
| custom_aspect_width | INT | 161–8192 | — |
| custom_aspect_height | INT | 91–8192 | — |
| divisor | COMBO | 32 | 3 options: 8, 16, 32 |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |
| scale | FLOAT | — |
| actual_megapixels | FLOAT | — |