Nodes/bsz-cui-extras/BSZ Combined Hi Res
ComfyUI Node

BSZ Combined Hi Res

Both hires calculators behind one toggle

By Beinsezii·Created 3 years ago·Updated 2 years ago· 27
BSZ Combined Hi Res
    • Lo Res Width
    • Lo Res Height
    • Hi Res Width
    • Hi Res Height
    base_model_res1024
    desired_width1536
    desired_height1536
    use_aspect_scaletrue
    desired_aspect_x3
    desired_aspect_y2
    scale1.5

    BSZ Combined Hi Res is the pack's all-in-one hires calculator: it merges the absolute and aspect-based versions into a single node with a boolean toggle, so you get one node in your workflow instead of having to swap two different ones.

    Why you'd reach for it

    If you've read the BSZ Absolute Hi Res and BSZ Aspect Hi Res articles, you already know the two modes. This node is the "just put this in a template and stop thinking" option - the author ships their own example workflows using it, and it's the node that appears in the pack's sdxl.json and sdxl-upscale.json demos. The README calls it "a unique node that functions both as BSZAbsoluteHires and BSZAspectHires with a convenient toggle," which is exactly right: it's the same math, all inputs present, one switch.

    How it works

    The one input that decides everything is use_aspect_scale:

    • On - uses the aspect path: desired_aspect_x, desired_aspect_y, and scale (with the README's warning that a 2.0 scale quadruples pixels).
    • Off - uses the absolute path: desired_width and desired_height for a final size.

    Either way you also set base_model_res (SD 1.5 ≈ 512, SD 2.1 ≈ 768, SDXL ≈ 1024), and you get the same four outputs the family shares:

    • Lo Res Width / Lo Res Height - for the first-pass Empty Latent.
    • Hi Res Width / Hi Res Height - for the upscale and second pass.

    All values come out rounded to multiples of 8. Because it's a plain math node - it never touches your model or latent - toggling use_aspect_scale re-runs nothing expensive. It's about as cheap a node as exists in ComfyUI.

    Install

    It's in bsz-auto-hires.py inside Beinsezii's bsz-cui-extras:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Beinsezii/bsz-cui-extras
    

    Restart, or install through ComfyUI Manager by searching "bsz-cui-extras". No dependencies, no model files to download.

    When to use it vs. the singles

    Honestly, this is the one I'd put in a saved workflow. The toggle costs you nothing - the unused input set just sits there - and it means when you want to switch from "aspect + scale" to "absolute pixels," you flip a boolean instead of deleting a node and adding another. The only reason to use the separate nodes is a cleaner graph or if you're deliberately keeping one mode out of reach. Wire the four outputs into an Empty Latent (lo-res) and a LatentUpscale or image scale (hi-res), run your first pass, then your second KSampler at low denoise - that's the whole hires-fix recipe this pack is built around.

    Categorybeinsezii/utils

    Inputs (7)

    NameTypeDefaultDescription
    base_model_resINT10248–4096
    desired_widthINT15368–4096
    desired_heightINT15368–4096
    use_aspect_scaleBOOLEANtrue
    desired_aspect_xFLOAT30.1–100
    desired_aspect_yFLOAT20.1–100
    scaleFLOAT1.50.1–10

    Outputs (4)

    NameTypeDescription
    Lo Res WidthINT
    Lo Res HeightINT
    Hi Res WidthINT
    Hi Res HeightINT