π³ CR Aspect Ratio Banners
Ad-sized canvases and a matching empty latent
- width
- height
- upscale_factor
- prescale_factor
- batch_size
- empty_latent
- show_help
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), pluscustomif you'd rather type your ownwidth/height.width/height- only really used when you pickcustom; 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.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 102464β8192 | β |
| height | INT | 102464β8192 | β |
| aspect_ratio | COMBO | 15 options: custom, Large Rectangle - 336x280, Medium Rectangle - 300x250, Small Rectangle - 180x150, Square - 250x250, Small Square - 200x200, +9 | |
| swap_dimensions | COMBO | 2 options: Off, On | |
| upscale_factor | FLOAT | 1.00.1β100 | β |
| prescale_factor | FLOAT | 1.00.1β100 | β |
| batch_size | INT | 11β64 | β |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| width | INT | β |
| height | INT | β |
| upscale_factor | FLOAT | β |
| prescale_factor | FLOAT | β |
| batch_size | INT | β |
| empty_latent | LATENT | β |
| show_help | STRING | β |