GFPGAN v1.4 blind face restoration converted to MLX
NHWC safetensors for Apple Silicon. 87,143,276 parameters (params_ema), fp32.
GFPGANv1Clean — degradation-removal U-Net + StyleGAN2 (clean) decoder
with channel-split SFT. 512×512 aligned face crops, RGB in [-1, 1].(O,kH,kW,I); the 5-D modulated-conv kernels (1,O,kH,kW,I);
every other 4-D tensor (biases, stored noise buffers, constant input) takes the same
(0,2,3,1) transpose. Keys mirror the upstream state dict exactly.randomize_noise=False
is the deterministic parity mode).Apache-2.0. The upstream repo carries third-party carve-outs (NVIDIA StyleGAN2,
DFDNet) that do NOT touch this artifact: the clean architecture contains no NVIDIA-derived
code, and the v1.4 decoder prior was trained from scratch by BasicSR
(StyleGAN2_512_Cmul1_FFHQ_B12G4_scratch_800k.pth, Apache-2.0), not from NVIDIA's FFHQ
weights. Trained on FFHQ (dataset compilation CC-BY-NC-SA — the standard unsettled
dataset-to-weights question that applies to every face model).
Swift (Apple Silicon): mlx-gfpgan-swift — GFPGANMLXCore.GFPGANv1Clean +
MLXGFPGAN.GFPGANRestorePackage (MLXEngine imageRestore, Vision-based detect/align/paste).
Converted with oracle/convert.py in that repo; parity vs the PyTorch reference:
key contract 285/285 tensors, per-stage taps 94/94 ≤ 5e-4 relative (fp32, CPU stream).