Nodes/Comfyroll Studio/πŸ”³ CR_Aspect Ratio For Print
ComfyUI Node Runs on cloud

πŸ”³ CR_Aspect Ratio For Print

A4, B5 and friends, latent included

By Suzie1Β·Created 3 years agoΒ·Updated 2 years agoΒ· 1,287
πŸ”³ CR_Aspect Ratio For Print
    • width
    • height
    • upscale_factor
    • prescale_factor
    • batch_size
    • empty_latent
    • show_help
    β—„width1024β–Ί
    β—„height1024β–Ί
    β—„aspect_ratioβ–Ύβ–Ί
    β—„swap_dimensionsβ–Ύβ–Ί
    β—„upscale_factor1.0β–Ί
    β—„prescale_factor1.0β–Ί
    β—„batch_size1β–Ί

    Generating something you actually intend to print? Then you care about paper ratios - A4, A5, B5, and the rest of the ISO series - and you'd rather not do the pixel math for "A4 at print resolution" in your head. This node has the whole A- and B-series baked in as presets. Pick one, and it gives you the correct width and height plus a pre-sized empty latent to sample on.

    It's from Comfyroll Studio (Suzie1 / RockOfFire), a sibling of the pack's other aspect-ratio nodes. Same shape as all of them: a dropdown in, dimensions and a ready latent out.

    How it works

    It's a lookup table of print proportions. The presets carry pixel dimensions (A4 at 2480x3508, A5 at 1748x2480, and so on down the series), the node applies your scale factors, and it allocates an empty latent matched to that size - so you don't wire up a separate latent node and hand-copy numbers.

    A word of honesty about those numbers: the presets are sized for print proportions, and the raw A4 preset is already a large canvas. You will not want to diffuse a full A4 directly on most models - that's a job for generating smaller and upscaling into print resolution afterward (this is exactly the "more pixels" problem, and a good tile-based upscaler is the tool for it, not the sampler).

    The inputs that matter

    • aspect_ratio - the preset dropdown: the full A-series (A4 down to A10), the B-series (B4 down through B8 and beyond), and more. custom lets you type your own width/height instead.
    • swap_dimensions (Off / On) - flip portrait to landscape. Every paper preset is listed one way; this saves you a second entry for the rotated version.
    • prescale_factor - scales the actual generation size up front. This is the one that changes what you render.
    • upscale_factor - carried through on an output pin for a later upscale node; it does not change the latent here.
    • batch_size - number of latents to generate.

    Outputs: width, height, upscale_factor, prescale_factor, batch_size, empty_latent, and the ignorable show_help link. Feed empty_latent into your sampler; the int outputs keep the rest of your graph agreeing on size.

    How to install it

    • ComfyUI Manager: search Comfyroll Studio, install, restart.
    • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git, then restart.

    No model downloads.

    Common issues

    The main trap is treating this as a "generate at print size" button. If you sample directly on a full A4 latent you'll get a slow render full of repeated limbs and duplicated composition, because diffusion models weren't trained anywhere near that resolution or aspect. Generate at a sensible size, then upscale to the print dimensions - the node's upscale_factor output exists precisely to hand that number to a downstream upscaler.

    Also: prescale_factor scales generation, upscale_factor doesn't (it's just a value on a pin). Mix those up and your output size won't match your expectation. And if the node's simply not in your menu, that's the pack failing to load - usually a Pillow version mismatch on newer Python - not this node specifically.

    Category🧩 Comfyroll Studio/✨ Essential/πŸ”³ Aspect Ratio

    Inputs (7)

    NameTypeDefaultDescription
    widthINT102464–8192β€”
    heightINT102464–8192β€”
    aspect_ratioCOMBO23 options: A4 - 2480x3508, A5 - 1748x2480, A6 - 1240x1748, A7 - 874x1240, A8 - 614x874, A9 - 437x614, +17
    swap_dimensionsCOMBO2 options: Off, On
    upscale_factorFLOAT1.00.1–100β€”
    prescale_factorFLOAT1.00.1–100β€”
    batch_sizeINT11–64β€”

    Outputs (7)

    NameTypeDescription
    widthINTβ€”
    heightINTβ€”
    upscale_factorFLOATβ€”
    prescale_factorFLOATβ€”
    batch_sizeINTβ€”
    empty_latentLATENTβ€”
    show_helpSTRINGβ€”