NAFNet MLX
Collection
MLX port of NAFNet (Simple Baselines for Image Restoration): on-device deblur/denoise on Apple Silicon. โข 3 items โข Updated
How to use mlx-community/NAFNet-SIDD-width64 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir NAFNet-SIDD-width64 mlx-community/NAFNet-SIDD-width64
Apple MLX port of NAFNet (Simple Baselines for Image Restoration, ECCV 2022). Runs on Apple Silicon via MLX.
This checkpoint: SIDD (Image denoising). width64.
from nafnet_mlx import NAFNetConfig
from nafnet_mlx.pipeline import load_model, restore_to_file
m = load_model("model.safetensors", NAFNetConfig.sidd_width64())
restore_to_file(m, "input.png", "output.png")
Faithful NHWC port (SimpleGate, Simplified Channel Attention, channel-axis LayerNorm2d, UNet + PixelShuffle). PT-vs-MLX full-model parity on a real image ~1e-6.
MIT. Derived from megvii-research/NAFNet (MIT). See NOTICE.
Quantized