Nodes/ComfyUI_JR_MiniMaxH3Node/JR MiniMax H3 Resolution Scale Calculator
ComfyUI Node

JR MiniMax H3 Resolution Scale Calculator

Stop doing upscale math in your head — the H3 resolution calculator

By Goldlionren·Created 21 days ago·Updated about 9 hours ago· 28
JR MiniMax H3 Resolution Scale Calculator
    • width
    • height
    • scale
    • actual_megapixels
    source_width768
    source_height1152
    target_megapixels0.88
    aspectSource
    custom_aspect_width16
    custom_aspect_height9
    divisor32

    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 aspect on a preset instead of Source, or divisor snapped 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 scale is linear, so it's the area that scales by the square. For ~2× the pixels you want a scale near 1.41, not 2.
    CategoryJR MiniMax H3/Scaling

    Inputs (7)

    NameTypeDefaultDescription
    source_widthINT7681–16384
    source_heightINT11521–16384
    target_megapixelsFLOAT0.880.001–256
    aspectCOMBOSource7 options: Source, 1:1, 2:3, 3:2, 16:9, 9:16, +1
    custom_aspect_widthINT161–8192
    custom_aspect_heightINT91–8192
    divisorCOMBO323 options: 8, 16, 32

    Outputs (4)

    NameTypeDescription
    widthINT
    heightINT
    scaleFLOAT
    actual_megapixelsFLOAT