Nodes/Comfyroll Studio/πŸ”³ CR Aspect Ratio Banners
ComfyUI Node Runs on cloud

πŸ”³ CR Aspect Ratio Banners

Ad-sized canvases and a matching empty latent

By Suzie1Β·Created 3 years agoΒ·Updated 2 years agoΒ· 1,287
πŸ”³ CR Aspect Ratio Banners
    • 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β–Ί

    If you're generating imagery for web ads - leaderboards, skyscrapers, medium rectangles, the whole IAB standard-banner zoo - this node saves you from memorizing pixel dimensions. Pick "Wide Skyscraper - 160x600" or "Billboard - 970x250" from a dropdown, and it hands you the right width and height plus an empty latent already sized to match. Wire that latent into your sampler and you're generating at ad spec from the first render.

    It's part of Comfyroll Studio (Suzie1 / RockOfFire), one of a small family of aspect-ratio helpers in the pack. They all follow the same pattern: a preset dropdown in, dimensions and a ready-to-sample latent out.

    How it works

    There's no magic - it's a lookup table. Each preset maps to a known width/height, the node applies your scale factors, and it allocates an empty latent of that size so you don't have to add a separate Empty Latent Image node and copy numbers between them. That "latent comes pre-sized" bit is the actual convenience.

    The inputs that matter

    • aspect_ratio - the preset dropdown: standard banner formats (Medium Rectangle 300x250, Half Page 300x600, Leaderboard, Billboard, Skyscraper, and friends), plus custom if you'd rather type your own width/height.
    • width / height - only really used when you pick custom; otherwise the preset drives them.
    • swap_dimensions (Off / On) - flip width and height. Quick way to rotate a portrait spec to landscape without hunting for the mirrored preset.
    • upscale_factor - passed through on its own output for a later upscale stage; it doesn't change the latent you generate on. Think of it as a note you're handing downstream.
    • prescale_factor - this one does scale the generation dimensions up front, so you can render larger than the raw banner size and downscale later for crispness.
    • batch_size - how many latents in the batch.

    Outputs: width, height, upscale_factor, prescale_factor, batch_size, empty_latent, and a show_help link. The latent goes to your KSampler; the width/height ints are there to feed anything else that needs to agree 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 models to download.

    Common issues

    The thing to understand - and it's not obvious - is the difference between prescale_factor and upscale_factor. Prescale changes what you actually generate; upscale is just a value carried on an output pin for a downstream upscaler. If your renders come out at the raw banner size when you expected them bigger, you turned the wrong knob: raise prescale_factor.

    Also worth knowing: extreme banner ratios (a 160x600 skyscraper, say) are brutal on diffusion models trained on roughly square images - you'll get repeated or stretched content. The fix is the usual one for weird aspect ratios: generate at a saner shape and extend or outpaint into the banner frame, rather than sampling the full 160x600 directly. And if the whole Comfyroll pack is missing from your node menu, that's a pack-load failure (often a Pillow mismatch on newer Python) rather than anything specific to this node.

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

    Inputs (7)

    NameTypeDefaultDescription
    widthINT102464–8192β€”
    heightINT102464–8192β€”
    aspect_ratioCOMBO15 options: custom, Large Rectangle - 336x280, Medium Rectangle - 300x250, Small Rectangle - 180x150, Square - 250x250, Small Square - 200x200, +9
    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β€”