Big-LaMa for mobile
models for on-device inpainting
2 min readupdated
This is a conversion of the well-known Big-LaMa model for the mobile platforms Core ML (for iOS) and LiteRT (for Android), designed for object removal and background filling. The original model weights remain unchanged, but the formats were adapted to run on smartphones and tablets. The iOS variant is 50 MB and optimized with 8-bit weight compression (palettization), while the Android version uses matrix products instead of Fourier transforms to run on GPUs and NPU accelerators. This release will be useful for mobile app developers who need high-quality background inpainting directly on the device.
Key features
- Original Big-LaMa weights with no loss in inpainting quality
- Core ML support for iOS 17+ with 8-bit weight quantization
- LiteRT (Android) version replacing FFT with matrix operations for NPU execution
- Optimized inference speed (~250 ms on Mac GPU and ~184 ms on Snapdragon 8 Elite NPU)
What you can do
- Integrate the inpainting model into an iOS app to remove objects from photos
- Add background infilling to an Android app using hardware NPU accelerators
- Use ready-to-use .mlpackage files or compiled graphs in your computer vision projects
Example
The model inputs require an image and a mask of 512×512 pixels. For Core ML, inference is run via computeUnits = .cpuAndGPU, since fast Fourier transforms are not supported directly on the Neural Engine.
Read more
DetailsBenchmarks: mean absolute error of 0.050 for Core ML and 3e-6 for TFLite.
Platforms: iOS 17+ (Core ML) and Android / LiteRT.
License: Apache-2.0.










Comments