EBU Compute Image Upscale
Let it do the 'how much to upscale' math for you
- image
- upscale_by
- upscaled_width
- upscaled_height
EBU Compute Image Upscale answers a question every upscale chain asks: "This image is 832x1216, my target is at least 2560 wide - what factor do I actually scale by?" You'd normally solve that with a calculator between keystrokes, or hardcode a guess and hope. This node just reads the image, does the division, and hands you the exact multiplier plus the resulting dimensions.
It's part of the EBU Workflow pack (burnsbert/ComfyUI-EBU-Workflow), a small collection of resolution and file-utility nodes with zero external dependencies. This one is the "figure out the number" node - it computes, it doesn't resize. You take its output and drive an actual upscaler with it.
How it works
The mechanism is straightforward but has one design decision worth respecting. It reads the first image's dimensions, computes the factor needed to reach min_width (if set) and the factor needed to reach min_height (if set), then takes the maximum of the two, floored at 1.0. Taking the max means both minimums are guaranteed satisfied; the 1.0 floor means it will never return a downscale factor, no matter how oversized your input is.
The upscaled dimensions are then math.ceil'd - no rounding down into the danger zone where you almost hit your target but don't quite.
Inputs and outputs
- image (IMAGE) - the image to measure.
- min_width (INT, default 2560) - minimum target width.
- min_height (INT, default 1440) - minimum target height.
Outputs:
- upscale_by (FLOAT) - the factor to feed an "Upscale Image By" node. This is the one you'll actually wire somewhere.
- upscaled_width / upscaled_height (INT) - what the image will be at that factor. Useful for sanity checks and for feeding downstream nodes that want concrete dimensions.
Set min_width or min_height to 0 to ignore that axis - the code explicitly skips a minimum of zero, so it's a deliberate feature, not an accident.
Where it fits
Two common setups. The straightforward one: wire upscale_by into an ImageUpscaleBy-style node, and your chain auto-adapts to whatever resolution came out of the sampler - no manual retuning when you swap checkpoints or change aspect ratios.
The smarter one: pair it with the pack's EBU Scaling Resolution. That node gives you preset target dimensions; this node gives you the factor to hit an arbitrary minimum from an unknown source. Between the two, your upscale front-end stops needing hand edits every run.
One honest caveat: math.ceil can push the result one pixel over a target, and this node does not round to multiples of 8 like EBU Scaling Resolution does. If your target feeds straight into a latent or a VAE, check the output dimensions - you may want to round to an 8-multiple yourself.
Installing
The pack installs with no dependencies beyond Python's standard library - no torch extra, no model files. ComfyUI Manager (search "EBU Workflow"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/burnsbert/ComfyUI-EBU-Workflow
then restart ComfyUI.
Gotchas
- Only the first image in a batch is measured. Batched inputs get one factor applied to everything.
- It never downscales - the 1.0 floor is intentional. If your image already exceeds the minimums,
upscale_bycomes back as 1.0 andupscaled_*equals the source size. - "Upscale" here means "pixels," not "detail." A higher factor just gives the upscaler model more canvas; it won't invent detail that isn't there. Generate, then climb - this node is the climb's odometer, not its engine.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| min_width | INT | 25600–16384 | — |
| min_height | INT | 14400–16384 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| upscale_by | FLOAT | — |
| upscaled_width | INT | — |
| upscaled_height | INT | — |