How to use from the
Use from the
MLX library
# Download the model from the Hub
pip install huggingface_hub[hf_xet]

huggingface-cli download --local-dir RestoreFormerPlusPlus-fp32 mlx-community/RestoreFormerPlusPlus-fp32

RestoreFormerPlusPlus-fp32 (MLX)

RestoreFormer++ (TPAMI 2023) blind face restoration converted to MLX NHWC safetensors for Apple Silicon. 73,472,579 parameters (441 tensors), fp32.

  • Architecture: VQVAEGANMultiHeadTransformer โ€” VQ-GAN encoder/decoder over a 1024ร—256 ROHQD codebook, multi-scale multi-head cross-attention (enc attn @16, dec @[16, 32]). 512ร—512 aligned face crops, RGB in [-1, 1]. Fully deterministic.
  • Source: the author's official RestoreFormer++.ckpt (v1.0.0 GitHub release); vqvae.* state re-exported through the instantiated architecture.
  • Layout: MLX NHWC. Conv (O,kH,kW,I); GroupNorm vectors, biases, and the codebook embedding pass through. Keys mirror the upstream state dict (prefix stripped).
  • dtype: fp32. Measured alternatives: fp16 50.1 dB vs the fp32 golden (viable), bf16 38.6 dB (mantissa-bound โ€” fp16 beats bf16 here). Late-decoder activations reach ยฑ14k.

License

Apache-2.0 โ€” upstream is plain Apache-2.0 with no third-party carve-outs. Trained on FFHQ (dataset compilation CC-BY-NC-SA โ€” the standard unsettled dataset-to-weights question).

Consume

Swift (Apple Silicon): mlx-restoreformer-swift โ€” RestoreFormerMLXCore.RestoreFormer + MLXRestoreFormer.RestoreFormerRestorePackage (MLXEngine imageRestore, Vision-based detect/align/paste).

Parity vs the PyTorch reference: key contract 441/441 tensors; per-stage taps 40/40 โ‰ค 5e-4 relative (fp32, CPU stream); codebook indices 256/256 exact.

Downloads last month

-

Downloads are not tracked for this model. How to track
Safetensors
Model size
73.5M 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