← All posts

ClearPix engineering series · Part 18

Can a General Real-ESRGAN Model Handle Anime? Our 45-Case Browser Baseline

By the ClearPix team · Oct 27, 2026 · 4 min read

The answer is yes—with a qualification that matters more than the headline: ClearPix's current realesr-general-x4v3 pipeline produced usable anime enlargements, but it also softened faint lines, small accessories, and screentone. We are keeping that model for the first anime tool page. We are not calling it an anime-specific model, and we are not calling the output preservation-grade.

The suite contains 15 modern anime and illustration sources, each tested as clean, JPEG70, and JPEG40 input: 45 runs through the production ONNX Runtime Web pipeline. The average full-image PSNR was 23.581 dB and SSIM 0.867. Those numbers are useful for spotting regressions. They are not a quality verdict.

We had to fix the ruler first

Our first run produced impossible values, including NaN and extremely low PSNR on transparent JPEG cases. The model had not suddenly collapsed. The benchmark was wrong in two separate ways.

Some source dimensions were not divisible by four. Downsampling with rounded dimensions and upscaling by four produced a result one or two pixels larger than the reference, so pixels were compared at the wrong positions. The generator now makes every reference dimension a multiple of four before creating the input.

Transparent sources created a second problem. JPEG inputs were flattened on white, while the transparent reference still contained RGB values in invisible pixels. Comparing those RGB arrays directly measured a background-encoding difference rather than model quality. PSNR, SSIM, and high-frequency metrics now use images composited on white. Alpha is evaluated separately.

That alpha metric compares the output with a 4× resampling of the input alpha. Comparing a JPEG-flattened input with the original transparent file would be meaningless. After the corrections, all 24 cases with non-opaque source pixels report alpha MAE 0.

Alpha was a product bug, not a model choice

The shared upscaler wrote alpha 255 into every output pixel. This made transparent anime PNGs opaque regardless of which super-resolution model we chose.

We now reconstruct the source alpha at the output dimensions. Fully transparent pixels have their RGB normalized to zero, and the alpha-preservation path applies to both single-shot and tiled inference. This is a shared pipeline fix, so the existing 15-case general upscale suite and the media tools that use it still have to pass regression checks.

The important lesson is that “use an anime model” would have been a plausible but incomplete answer. File-format behavior can matter as much as model selection.

Where the general model worked

Flat colors, clean silhouettes, ordinary character illustrations, and moderately complex wallpapers remained usable across the three input variants. The fine freehand line art stayed coherent. The colored manga portrait retained its hair highlights and composition. The anime-expo wallpaper kept its mecha and background readable despite the expected softness.

The JPEG results also remind us not to read every higher number as “better.” Compression can remove some high-frequency noise before inference. A cleaner metric may coexist with a visible change in texture. The fixed crops remain the final check.

Where it did not meet a preservation claim

Five sources carry warnings in our review:

  • Screentone: the regular dot pattern visibly softens and changes. We cannot claim that dots are preserved.
  • Faint line art: pale lines and small details become weaker.
  • Detailed character with a camera: small accessories, hair, and camera details smear more than the large shapes.
  • Group wallpaper: faces and small costume details soften.
  • Pencil sketch: paper and pencil texture are amplified, which may be undesirable when a softer look is wanted.

The review was AI-assisted visual inspection of fixed crops, not owner-approved human QA. We record that distinction in the result files. Public review states should never be used to imply that a person has signed off when nobody has.

Why we are not adding a second model today

Real-ESRGAN distributes an anime-specific model. It may be a useful future experiment, but adding it would mean another download, another session lifecycle, another quantization check, and another browser memory budget. A model name is not enough to justify those costs.

The current model passed the “usable with disclosed boundaries” gate. The next anime page therefore uses the same general-x4v3 pipeline as the main image upscaler. It adds scene-specific guidance, evidence, and the alpha fix—not a fictional new engine.

If future cases show that the general model fails the tasks users actually care about, an anime-specific candidate will need to beat it on identical inputs, crops, sharpening, runtime, and download size. A win on one wallpaper would not be enough.

What we are publishing

The Quality dashboard now includes the anime suite, its methodology, real crops, metrics, review states, and per-case attribution. JSON and CSV downloads use the same published data.

The anime image upscaler uses that production path directly. It recommends ordinary anime wallpapers, illustrations, and avatars while warning against preservation expectations for screentone, faint lines, and tiny details. The companion test-set article explains the source licenses and coverage gaps.

That is the baseline: useful enough to ship honestly, not good enough to stop measuring.

ClearPix is free, unlimited and runs entirely in your browser. If this post saved you a debugging session, a coffee keeps the model hosting and bandwidth paid for — nothing here is locked behind it.

Buy me a coffee