--- library_name: mlx license: mit base_model: Picsart-AI-Research/MI-GAN pipeline_tag: image-to-image tags: - mlx - inpainting - object-removal --- # mlx-community/MI-GAN-256-ffhq-fp16 MI-GAN mobile inpainting, 256 FFHQ (faces). Converted to **Apple MLX** (`-fp16`) for Apple-Silicon inference via the [`mlx-lama-swift`](https://github.com/xocialize/mlx-lama-swift) Swift package (the MLXEngine `imageInpaint` ModelPackage / Forge **Erase** capability). From-scratch MLX-Swift architecture port of [Picsart-AI-Research/MI-GAN](https://github.com/Picsart-AI-Research/MI-GAN); parity-locked vs the PyTorch oracle on the CPU stream (LaMa predicted max_abs 3.2e-5 · MI-GAN 5.5e-5). ## Use ```swift // Package.swift → .package(url: "https://github.com/xocialize/mlx-lama-swift", from: "0.1.0") import LaMa // or MIGAN let inpainter = try LaMaInpainter.fromPretrained(weightsPath, dtype: .float16) let filled: CGImage = inpainter(sourceCGImage, mask: maskCGImage) // white mask = remove ``` Input: image + mask (white = region to remove). Output: filled image at source resolution. Weights license: mit. Port code: MIT.