Instructions to use mlx-community/Real-ESRGAN-x2plus with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Real-ESRGAN-x2plus with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir Real-ESRGAN-x2plus mlx-community/Real-ESRGAN-x2plus
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
Add Real-ESRGAN-x2plus MLX fp16 (Real-ESRGAN port)
Browse files- README.md +43 -0
- config.json +13 -0
- model.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: bsd-3-clause
|
| 3 |
+
library_name: mlx
|
| 4 |
+
pipeline_tag: image-to-image
|
| 5 |
+
tags:
|
| 6 |
+
- mlx
|
| 7 |
+
- super-resolution
|
| 8 |
+
- real-esrgan
|
| 9 |
+
- image-to-image
|
| 10 |
+
- apple-silicon
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# Real-ESRGAN-x2plus (MLX)
|
| 14 |
+
|
| 15 |
+
Apple **MLX** fp16 port of Real-ESRGAN **RealESRGAN_x2plus** (RRDBNet, 脳2),
|
| 16 |
+
for super-resolution on Apple Silicon. Converted from the official
|
| 17 |
+
[xinntao/Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN) release checkpoint
|
| 18 |
+
(BSD-3-Clause).
|
| 19 |
+
|
| 20 |
+
## Usage
|
| 21 |
+
|
| 22 |
+
```bash
|
| 23 |
+
pip install realesrgan-mlx # https://github.com/xocialize/realesrgan-mlx
|
| 24 |
+
realesrgan-mlx -i input.png -o out/ -n RealESRGAN_x2plus
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
```python
|
| 28 |
+
from realesrgan_mlx.pipeline_mlx import make_upsampler, upscale_image
|
| 29 |
+
up = make_upsampler("RealESRGAN_x2plus", tile=256) # tile>0 caps memory on large images
|
| 30 |
+
out = upscale_image("input.png", up)
|
| 31 |
+
```
|
| 32 |
+
|
| 33 |
+
`make_upsampler` downloads these weights automatically.
|
| 34 |
+
|
| 35 |
+
## Details
|
| 36 |
+
|
| 37 |
+
- **Architecture**: RRDBNet (`num_feat=64`, `num_block=23`, `num_grow_ch=32`)
|
| 38 |
+
- **Scale**: 脳2 路 **Precision**: fp16
|
| 39 |
+
- **Parity vs PyTorch**: full-forward 2.4e-6 (CPU fp32); fp16 vs fp32 golden 5.5e-4.
|
| 40 |
+
|
| 41 |
+
## License
|
| 42 |
+
|
| 43 |
+
BSD-3-Clause (upstream Real-ESRGAN, Xintao Wang et al.).
|
config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "RealESRGAN_x2plus",
|
| 3 |
+
"arch": "RRDBNet",
|
| 4 |
+
"netscale": 2,
|
| 5 |
+
"num_feat": 64,
|
| 6 |
+
"num_block": 23,
|
| 7 |
+
"num_grow_ch": 32,
|
| 8 |
+
"num_conv": 16,
|
| 9 |
+
"act_type": "prelu",
|
| 10 |
+
"pth_url": "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth",
|
| 11 |
+
"wdn_url": "",
|
| 12 |
+
"hf_name": "Real-ESRGAN-x2plus"
|
| 13 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:93c875ee5637ca326bae14420fbbb5be8a19f0eb7d3b0c6af08a8ef9c0180020
|
| 3 |
+
size 33472058
|