File size: 5,100 Bytes
e4d4e95
 
 
 
 
 
 
 
 
 
 
 
906fb44
 
 
 
e4d4e95
906fb44
e4d4e95
 
 
a2fe039
 
b9f3721
e4d4e95
 
 
 
 
a2fe039
 
 
 
 
 
 
 
 
 
 
b9f3721
a2fe039
 
 
 
 
 
 
 
 
 
 
 
 
 
e4d4e95
 
 
 
 
 
 
 
906fb44
 
e4d4e95
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
61
62
63
64
65
66
67
---
library_name: onnx
pipeline_tag: image-to-image
tags:
- super-resolution
- upscaling
- onnx
- image-upscaling
---

# Upscaling models, as ONNX

The model files run by [upscale](https://github.com/benbaker76/upscale), the command line
upscaler, and by the two front ends built on it: [Upscale Agent](https://github.com/benbaker76/UpscaleAgent),
the desktop app, and [UpsizerAI](https://github.com/benbaker76/UpsizerAI), the web app. All
three download from here on demand; nothing needs fetching by hand.

Each model is the original author's weights converted to ONNX by upscale's
`python/export_onnx.py`: opset and input/output naming are the same across all of them, and
height and width are dynamic so an image can be run whole or in tiles. Most come in two
precisions, `<name>.onnx` (float32 weights) and `<name>_fp16.onnx` (float16 weights, float32
input and output), which give the same picture to within one 8-bit level. A few also come as
`<name>_int8.onnx`: 8-bit weights, turned back to float32 as the network runs, a quarter of the
size and, on most images, within two levels of float32.

**Nothing here was trained by this organization.** Every file is a conversion, and each
remains under the license its author released the original weights under - follow the source
link for the terms, which for some models restrict commercial use.

| Model | Scale | fp32 | fp16 | int8 | Architecture | Original weights |
| --- | --- | --- | --- | --- | --- | --- |
| `APISR_GRL_x4` | x4 | 27.1 MB | 17.5 MB | - | GRL | [HikariDawn/APISR](https://huggingface.co/HikariDawn/APISR) |
| `APISR_RRDB_x2` | x2 | 18.7 MB | 9.8 MB | - | RRDBNet-6B | [HikariDawn/APISR](https://huggingface.co/HikariDawn/APISR) |
| `AnimeSharpV2_ESRGAN_Soft_x2` | x2 | 70.0 MB | 36.6 MB | - | ESRGAN | [Kim2091/AnimeSharpV2](https://huggingface.co/Kim2091/AnimeSharpV2) |
| `AnimeSharpV2_MoSR_Sharp_x2` | x2 | 18.0 MB | 9.4 MB | - | MoSR | [Kim2091/AnimeSharpV2](https://huggingface.co/Kim2091/AnimeSharpV2) |
| `AnimeSharpV2_MoSR_Soft_x2` | x2 | 18.0 MB | 9.4 MB | - | MoSR | [Kim2091/AnimeSharpV2](https://huggingface.co/Kim2091/AnimeSharpV2) |
| `AnimeSharpV2_RPLKSR_Sharp_x2` | x2 | 30.8 MB | 16.1 MB | - | RealPLKSR | [Kim2091/AnimeSharpV2](https://huggingface.co/Kim2091/AnimeSharpV2) |
| `AnimeSharpV2_RPLKSR_Soft_x2` | x2 | 30.8 MB | 16.1 MB | - | RealPLKSR | [Kim2091/AnimeSharpV2](https://huggingface.co/Kim2091/AnimeSharpV2) |
| `AnimeSharpV3_x2` | x2 | 70.0 MB | 36.6 MB | - | ESRGAN | [Kim2091/AnimeSharpV3](https://huggingface.co/Kim2091/AnimeSharpV3) |
| `BSRGAN_x2` | x2 | 69.7 MB | 36.4 MB | - | RRDBNet | [kadirnar/BSRGANx2](https://huggingface.co/kadirnar/BSRGANx2) |
| `MewZoom_V1_x2` | x2 | 23.2 MB | 12.5 MB | 7.3 MB | MewZoom TrunkNet | [andrewdalpino/MewZoom-V1-2X](https://huggingface.co/andrewdalpino/MewZoom-V1-2X) |
| `MewZoom_V1_UNet_x4` | x4 | 517.2 MB | 258.9 MB | 129.9 MB | MewZoom U-Net | [andrewdalpino/MewZoom-V1-4X-Unet](https://huggingface.co/andrewdalpino/MewZoom-V1-4X-Unet) |
| `RealESRGAN_anime_x4` | x4 | 18.7 MB | 9.8 MB | - | RRDBNet-6B | [xinntao/Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN) |
| `RealESRGAN_x2` | x2 | 70.0 MB | 36.6 MB | - | RRDBNet | [ai-forever/Real-ESRGAN](https://huggingface.co/ai-forever/Real-ESRGAN) |
| `RealESRGAN_x4` | x4 | 69.9 MB | 36.5 MB | - | RRDBNet | [ai-forever/Real-ESRGAN](https://huggingface.co/ai-forever/Real-ESRGAN) |
| `RealESRGAN_x4plus` | x4 | 69.9 MB | 36.5 MB | - | RRDBNet | [xinntao/Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN) |
| `RealESRGAN_x8` | x8 | 70.0 MB | 36.6 MB | - | RRDBNet | [ai-forever/Real-ESRGAN](https://huggingface.co/ai-forever/Real-ESRGAN) |
| `RealESR_General_x4` | x4 | 5.0 MB | 2.5 MB | - | SRVGGNetCompact | [xinntao/Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN) |
| `RealWebPhoto_RGT_x4` | x4 | 92.3 MB | - | - | RGT | [Phips/4xRealWebPhoto_RGT](https://huggingface.co/Phips/4xRealWebPhoto_RGT) |
| `Swin2SR_Classical_x2` | x2 | 72.4 MB | 40.0 MB | - | Swin2SR | [mv-lab/swin2sr](https://github.com/mv-lab/swin2sr) |
| `Swin2SR_Classical_x4` | x4 | 73.0 MB | 40.3 MB | - | Swin2SR | [mv-lab/swin2sr](https://github.com/mv-lab/swin2sr) |
| `Swin2SR_RealWorld_x4` | x4 | 72.3 MB | 39.9 MB | - | Swin2SR | [mv-lab/swin2sr](https://github.com/mv-lab/swin2sr) |
| `SwinIR_BSRGAN_x4` | x4 | 55.2 MB | - | - | SwinIR-M | [mikestealth/SwinIR](https://huggingface.co/mikestealth/SwinIR) |
| `UltraMix_Smooth_x4` | x4 | 69.9 MB | 36.5 MB | - | ESRGAN | [Kim2091/UltraSharp](https://huggingface.co/Kim2091/UltraSharp) |
| `UltraSharp_x4` | x4 | 69.9 MB | 36.5 MB | - | ESRGAN | [Kim2091/UltraSharp](https://huggingface.co/Kim2091/UltraSharp) |

## Using a file directly

```
https://huggingface.co/baker76/upscale-models/resolve/main/RealESRGAN_x4.onnx
```

Input is `[1, 3, H, W]` float32, RGB, 0 to 1; output is the same layout at the model's
scale. The x2 RRDBNet models need even sides, and the window-attention models and MewZoom's
U-Net need sides that are a multiple of 8 or 32; `models.json` in the UpsizerAI repository records the
multiple, and the peak activation, of each file.