xocialize commited on
Commit
16c284e
verified
1 Parent(s): efd1594

Add Real-ESRGAN-x4plus MLX fp16 (Real-ESRGAN port)

Browse files
Files changed (3) hide show
  1. README.md +43 -0
  2. config.json +13 -0
  3. 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-x4plus (MLX)
14
+
15
+ Apple **MLX** fp16 port of Real-ESRGAN **RealESRGAN_x4plus** (RRDBNet, 脳4),
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_x4plus
25
+ ```
26
+
27
+ ```python
28
+ from realesrgan_mlx.pipeline_mlx import make_upsampler, upscale_image
29
+ up = make_upsampler("RealESRGAN_x4plus", 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**: 脳4 路 **Precision**: fp16
39
+ - **Parity vs PyTorch**: full-forward 3.8e-6 (CPU fp32); fp16 vs fp32 golden 1.3e-3.
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_x4plus",
3
+ "arch": "RRDBNet",
4
+ "netscale": 4,
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.1.0/RealESRGAN_x4plus.pth",
11
+ "wdn_url": "",
12
+ "hf_name": "Real-ESRGAN-x4plus"
13
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6abde4aa36e24bd586e4f5e4ff8b55d0aa719acb05520d31745e444c1d990c8
3
+ size 33461689