# AI upscale comparison assets

These are real image-processing results produced for Image Batch, not competitor screenshots or a simulated before/after effect. The processing is reproducible with `scripts/build-upscale-comparisons.mjs` in the source repository using the pinned model below. Download the exact portrait original to `.sites-runtime/upscale-portrait-cc0-original.jpg` before rebuilding; its SHA-256 is checked by the script.

## Inputs and transformations

Both subjects use a 192 × 128 RGB input saved losslessly as `<subject>-source-low.png`. A neutral bicubic 4× enlargement of exactly that input forms `<subject>-before.webp`. `<subject>-after.webp` is the real 768 × 512 neural-network output. Both comparison files use lossless WebP. There is no added blur, sharpening, retouching, extra noise, or higher-resolution original substituted for the after image. Normal antialiased reduction is used only to prepare the low-resolution input.

`<subject>-sample-512.png` is a separate, higher-resolution 512 × 341 sample from the same original framing. It is intended for the live app's Try sample action, where the larger source can reach the 8K preset within the app's 16× enlargement limit. It is **not** the 192 × 128 input used in the comparison. Choose `source-low.png` when reproducing the exact displayed example.

### Product

- Source: the existing project asset `public/images/batch-sample.png`, 1536 × 1024, orange mug on a lavender background. It is reused without introducing any new external product-image licence claim.
- Framing: entire source image, no additional crop.
- Before and after: 768 × 512; exact comparison input: 192 × 128.

### Portrait

- Work: **Women Portrait Creative Commons**, photographed by **Wendelin Jacober**, featuring **Sheila Rizzio**, taken 2015-09-10.
- Primary photographer page: <https://www.flickr.com/photos/91619724@N04/29941887810/>. At verification on 2026-10-24, the author page links the photo to CC0/Public Domain and states private and commercial reuse.
- Archival file/verified licence record: <https://commons.wikimedia.org/wiki/File:Women_Portrait_Creative_Commons.jpg>. Commons records CC0 1.0 and a Flickr licence review.
- Downloaded original: <https://upload.wikimedia.org/wikipedia/commons/b/b6/Women_Portrait_Creative_Commons.jpg>, 5472 × 3648 JPEG. Original SHA-256: `f308dcf86c2689b57fc05de32c74be9dc7eaa8a51b813b0b084b7eb62bf7c5bc`.
- Licence: [CC0 1.0 Universal Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/).
- Framing: extract `{ left: 1700, top: 50, width: 2100, height: 1400 }` from the original, then reduce to 192 × 128.
- This is a technical image-enhancement example. No endorsement by the photographer or subject is claimed.
- No private user photographs were used.

## Model and inference

- Model: **Real-ESRGAN x4plus**, RRDBNet with 23 blocks, float32, ONNX opset 17.
- Export source: <https://huggingface.co/skillsafe-ai/realesrgan-x4plus/resolve/107475e49b7d46412cc966481efccc3500955801/model.onnx>.
- ONNX size: 67,051,650 bytes; SHA-256: `4851ec156207d271f5328605d0582eeb851e656227da8aca093ced9e60789291`.
- Official upstream weights: <https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth>.
- Upstream weight SHA-256 recorded by the export manifest: `4fa0d38905f75ac06eb49a7951b426670021be3018265fd191d2125df9d682f1`.
- Model licence: BSD 3-Clause, copyright (c) 2021 Xintao Wang; full notice: <https://raw.githubusercontent.com/xinntao/Real-ESRGAN/a4abfb2979a7bbff3f69f58f58ae324608821e27/LICENSE>.
- Runtime: ONNX Runtime Web WASM 1.30.0, single thread; RGB input 0–1; output clamped to 0–1 and quantized to 8-bit.
- The shared production `upscaleTiles`, `tilePlacement`, `upscaleInput`, and `upscaleOutput` helpers are used with the Quality model's 64-pixel tile core and 32-pixel halo. Only tile cores are stitched into the output.
- These general-purpose models can synthesize plausible detail. The examples demonstrate the model's output, not proof of recovering a person's original facial details.
