File size: 1,063 Bytes
51ca1df
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: bsd-3-clause
tags:
  - coreml
  - super-resolution
  - real-esrgan
  - image-upscaling
---

# Real-ESRGAN CoreML

CoreML conversion of [xinntao/Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN) (RealESRGAN_x4plus) for use in macOS/iOS apps.

## Model

- **Architecture**: RRDBNet (23 RRDB blocks, 64 features, 32 growth channels)
- **Scale**: 4x upscaling
- **Precision**: Float16
- **Input**: `(1, 3, 256, 256)` — RGB normalized [0, 1]
- **Output**: `(1, 3, 1024, 1024)` — RGB [0, 1]
- **Size**: ~33 MB (mlpackage), ~30 MB (zip)
- **Target**: macOS 15+

## Usage

Download `RealESRGAN-x4plus.mlpackage.zip`, unzip, then compile:

```swift
let compiledURL = try MLModel.compileModel(at: mlpackageURL)
let model = try MLModel(contentsOf: compiledURL)
```

For images larger than 256x256, use tile-based processing with overlap padding.

## License

BSD-3-Clause (same as original Real-ESRGAN)

## Credits

- Original model: [xinntao/Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN)
- Converted for [Fluxforge Studio](https://fluxforge.app)