All guides

Guide

2x or 4x? Choosing a scale and a model

Bigger is not automatically better. The right scale is the smallest one that reaches the size you need.

The pixel math

Scale multiplies both width and height, so pixel count grows with the square. A 2x result has 4 times the pixels of the input; a 4x result has 16 times. Of those, 3 in 4 (2x) or 15 in 16 (4x) are new pixels the model has to invent.

Input2x result4x result on this site
640 x 3601280 x 7202560 x 1440
854 x 4801708 x 9603416 x 1920
1280 x 7202560 x 1440reduced to 1024 x 576 first, then 4096 x 2304
1920 x 10803840 x 2160reduced to 1024 x 576 first, then 4096 x 2304

Our upscaler caps the result at 4096 pixels on the long edge so that it fits in the memory a browser tab can use. Larger inputs are reduced before upscaling and the tool shows a notice when that happens.

When 2x is the better choice

When 4x makes sense

A useful test: run 2x, then 4x, and compare both at the size you will actually display. If 2x scaled up by your layout looks as good, keep 2x.

Slim or Medium?

Both come from the open-source UpscalerJS project and share the same design. Medium has roughly three times the weights (about 2.8 MB against 0.9 MB for the 4x models, by the size of the files we serve), so it takes longer to download. UpscalerJS describes Slim as its fastest ESRGAN model for browsers and publishes no quality ranking we could cite, so judge by eye: start with Slim and switch to Medium if the result looks soft.

Speed

The model runs on your graphics chip through WebGL. Time grows with the number of input pixels, and a laptop integrated GPU is much slower than a desktop card. Without WebGL the tool falls back to the CPU, which can take minutes. Run time is shown after every job, so you can judge for your own machine.

Ready to try? Open the upscaler.

Working backwards from the size you need

Start from the destination, not the source. Divide the width you need by the width you have, and round up to the next available scale:

Downscaling a slightly larger result is harmless and often looks better than an exact-size upscale, because resizing down averages away small artefacts.

Two passes of 2x versus one 4x

Running 2x twice also gives four times the size, but each pass works from the previous pass's guesses, so any artefact from the first pass is enlarged and elaborated by the second. A single 4x pass from the original is usually cleaner. If you try both, compare them at the size you will publish.

Memory and file size

The browser holds the image in memory while it works, in several copies along the way. A 4096 x 2304 result is about 9.4 million pixels; stored as a PNG it is often several megabytes, more for photos with lots of fine texture. If a phone tab reloads or the tool reports a failure, use 2x or a smaller input.

Quick decision guide

Your sourceStart with
Under 500 px on the long edge4x, Slim
500 to 1100 px2x or 4x, compare both
HD video frame (1280 or 1920 px wide)2x
Faces or text are the point of the image2x, then judge closely

Try it on your own file. Free, in your browser.

Upscale an image