EnlargePictureA PictureEditor.com tool

Where a trained model beats arithmetic, and where it doesn’t

Every comparison you have read was written by somebody selling one of the two. Here is the version written by somebody who had to implement the losing side properly.

What each one actually is

A resampling kernel is a weighted average with a good set of weights. Lanczos 3 takes seven source pixels along each axis and combines them along a windowed sinc curve, which is the closest a finite filter gets to the ideal reconstruction of a sampled signal. It has no knowledge of photographs, faces, letters or bricks. It has a curve.

A trained upscaling network is a stack of convolutions whose weights were fitted by showing it millions of pairs — a sharp picture, and the same picture made small. It has learned what usually sits under a particular kind of blur. It has no curve. It has an enormous amount of experience and no idea whether it is right.

The kernel produces the best available description of the pixels you have. The network produces the most likely picture given the pixels you have. Those are different jobs, and almost every disagreement about upscaling is people comparing them as though they were the same one.

Where each one wins

The network wins on soft, ordinary, low-quality sources

A phone snapshot from 2012, a photo pulled off a social feed, a scan at 96 dots per inch — sources with real subject matter and very little recorded detail. Here a kernel can only spread what it has, and a network can supply texture that is consistent with what it sees. At 4× the difference is not subtle and it is not close. Anybody telling you otherwise is defending a position.

The kernel wins on anything with a right answer

Screenshots, diagrams, logos, scanned documents, technical photographs, and any picture where a person may later read something off it. A kernel enlarges a blurred word into a bigger blurred word, which is useless and honest. A network enlarges it into a sharp word, which is useful right up until the word is wrong.

It also wins on pixel art outright, where the correct enlargement is no interpolation at all, and on flat vector-ish artwork, where an edge-directed method keeps boundaries clean without inventing grain in the flat areas.

At 2× on a sharp source, it is close to a coin toss

This is the case the marketing never mentions. When the source is genuinely sharp and the factor is small, there is not much for a network to add: the neighbourhood around each new pixel is dense and informative, and a good kernel lands very near the right answer. We have not put a number on that gap, because there is no model in this build to measure one against, and a figure invented to sound rigorous would be worth less than the admission.

Which to reach for, by what you are holding
Your sourceBetter served byWhy
Soft phone photo, 4×A trained modelNothing left to interpolate from
Sharp photo, 2×EitherThe gap is smaller than the file size
Screenshot or diagramEdge-guided or nearestA right answer exists and invention breaks it
Anything with small textA kernelA wrong sharp letter is worse than a blurred one
Pixel artNearestThe squares are the artwork

Why there is no model here

Two reasons, and the second is the real one. The first is mechanical: a compact network in the ESRGAN family is five to thirty megabytes of weights that have to come down over the network before a single pixel can be enlarged. One download already happens here — the HEIC decoder, fetched from this site the moment somebody drops a photo straight off an iPhone — and adding a much heavier one to every enlargement is a different bargain. What has never travelled in either direction is your picture, and that is the sentence worth protecting.

The second is that a half-built model path is worse than none. An engine switch that downloads something, runs slowly, falls back silently and produces a result nobody can characterise is a button that makes a site look complete. The greyed-out entry in the method list is not an oversight — it is what an unshipped feature is supposed to look like.

Getting the most out of the side we did ship

Use Lanczos as the default and step down to Mitchell the moment you see a bright rim along a dark-to-light boundary at 1:1. Use edge-guided when the picture is made of lines rather than texture, and expect it to take a few seconds longer for a result that looks identical on a photograph of a hedge. Run the clean-up pass before the enlargement on anything that has been through a messaging app, and keep it low.

And check at 1:1, always. Everything above about Lanczos, Mitchell, edge-guided and nearest is settled in about thirty seconds with your own picture and the compare button, which is rather the point of putting the loupe where it is. What is said about trained networks cannot be settled that way here, because there is no model on this site to run one against — take that half as an argument, and argue with it.

Back to the picture