GFPGANv1.4-fp32 (MLX)

GFPGAN v1.4 blind face restoration converted to MLX NHWC safetensors for Apple Silicon. 87,143,276 parameters (params_ema), fp32.

  • Architecture: GFPGANv1Clean โ€” degradation-removal U-Net + StyleGAN2 (clean) decoder with channel-split SFT. 512ร—512 aligned face crops, RGB in [-1, 1].
  • Layout: MLX NHWC. Conv (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.
  • Noise: the checkpoint's stored noise buffers ship in the file (randomize_noise=False is the deterministic parity mode).
  • dtype: fp32. fp16 is DISQUALIFIED โ€” the e2e gate collapses (cosine โ‰ˆ โˆ’0.3, PSNR 8 dB); bf16 gates clean at 48 dB if you need it, but restoration ships fp32 here.

License

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).

Consume

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).

Downloads last month

-

Downloads are not tracked for this model. How to track
Safetensors
Model size
87.1M params
Tensor type
F32
ยท
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support