File size: 2,133 Bytes
56fcfbb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
license: bsd-3-clause
library_name: coreml
tags:
  - coreml
  - coremltools
  - apple-silicon
  - waifufinder
  - real-esrgan
  - image-super-resolution
---

Published by WaifuFinder. `manifest.json` pins 3 model files by SHA-256;
the app verifies every one of them, plus the licence, attribution and validation files,
before installation.
# Real-ESRGAN x2plus — optimized Core ML

Self-contained framewise 2× upscaler for
[WaifuFinder](https://github.com/alastorid/WaifuFinder). WaifuFinder downloads
these files directly: no Python, no source checkpoint, no conversion step.

## Contents

| Path | What |
| --- | --- |
| `RealESRGANValidated.mlpackage` | Converted, original-model-validated model |
| `manifest.json` | Architecture, original fingerprints, SHA-256 of every file |
| `validation.json` | Original-model parity, tile and product checks |
| `LICENSE` | Real-ESRGAN weights, BSD 3-Clause |
| `BasicSR-LICENSE` | Reference architecture, Apache-2.0 |
| `NOTICE` | Attribution and conversion summary |

The app compiles the package once at install time, on the machine that will run
it, because compiled Core ML is tied to the local compiler and macOS version.

## What "optimized" means

The network is the unmodified Real-ESRGAN x2plus. The conversion:

- fuses the first convolution into the following stage;
- expresses 256, 384 and 522 pixel inputs as enumerated Core ML shapes, so a
  small tile is upscaled at its own size instead of being padded to 522;
- records the measured parity against the original PyTorch network in the model
  metadata, and the app refuses to use a package that is not that validated one.

`validation.json` records the measurements: maximum absolute error against the
original network stays at or below 0.0069 across every supported input size,
against a 0.01 acceptance bound.

## Provenance

Weights: [xinntao/Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN),
`RealESRGAN_x2plus.pth`. Architecture reference:
[XPixelGroup/BasicSR](https://github.com/XPixelGroup/BasicSR) revision
`8d56e3a`.

## Licence

BSD 3-Clause (weights). See `LICENSE`, `BasicSR-LICENSE` and `NOTICE`.