Nodes/comfyui-sequential-batcher/📐 ResTool 8x (SD1.5)
ComfyUI Node

📐 ResTool 8x (SD1.5)

SD1.5 resolution that won't drift below 512x512 — and always snaps to 8

By Meisoftcoltd·Created 7 months ago·Updated 18 days ago· 3
📐 ResTool 8x (SD1.5)
    • width
    • height
    • debug_info
    • log
    aspect_ratio
    base_resolution1024

    Every Stable Diffusion user has asked the same question in their head: "what resolution should I actually use for a 16:9 image on SD1.5?" And the answer is never just the aspect ratio - SD1.5 was trained at 512x512, it visibly falls apart below that, and resolutions that don't divide cleanly produce seams and artifacts. ResTool8x is the pack's shortcut for the "just give me a safe number" case, tuned for SD1.5.

    It's one of five sibling ResTool nodes in comfyui-sequential-batcher, differentiated by the model they're guarding. This one targets SD1.5 with a divisor of 8 and a minimum-pixel floor that matches 512x512. Feed it an aspect ratio and a target longest side, and it returns width and height that are divisible by 8 and never starve the model's training floor.

    How it works

    It's a three-step calculation. First, it lays out the geometry: your base_resolution becomes the longest side, and the other side is derived from the aspect ratio - so 16:9 at 1024 gives you a ~1024x576 canvas. Then the Megapixel Shield kicks in: if the total pixel count is below the model's floor (262,144 pixels, the area of 512x512), it scales both dimensions up proportionally until you're back above it. Finally it snaps both sides to a strict multiple of 8, so the latent dimensions come out clean. The debug_info output tells you exactly what it settled on.

    Inputs and outputs

    Just two inputs:

    • aspect_ratio - dropdown with 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, 3:2, 2:3.
    • base_resolution (INT, default 1024) - the longest side in pixels.

    Outputs are width and height (wire both into EmptyLatentImage), plus debug_info (a one-line WxH (Div 8) summary) and a verbose log. The two strings are free debugging - glance at debug_info instead of squinting at numbers.

    Installing it

    It ships with comfyui-sequential-batcher:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Meisoftcoltd/comfyui-sequential-batcher
    

    or ComfyUI Manager, search "comfyui-sequential-batcher", restart. Pure math - no models, no deps.

    Common issues

    The trap is thinking this is an upscaler. It's not; it protects a floor, it won't rescale an image up to a beautiful high-res render (see the KB's upscaling essay for that). And the training-floor logic only kicks in below the model's native area - if you ask for 21:9 at 2048, you get 2048 wide and no complaints, because that's your problem. For real-world SD1.5 work, remember the model was trained on 512x512; 768x768 and up trades quality for detail. This node just makes sure you never land in the "too small" gutter.

    Category🔁 Sequential Batcher/Tools

    Inputs (2)

    NameTypeDefaultDescription
    aspect_ratioCOMBO8 options: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, +2
    base_resolutionINT1024128–8192

    Outputs (4)

    NameTypeDescription
    widthINT
    heightINT
    debug_infoSTRING
    logSTRING