The LaMa inpainting model (Suvorov et al., "Resolution-robust
Large Mask Inpainting with Fourier Convolutions", WACV 2022), as exported to ONNX by
Carve/LaMa-ONNX (lama_fp32.onnx, commit c3c0c9e),
with its weights stored as float16 to halve the download. Every weight is cast back to float32
when the model loads, so inference runs in float32 exactly as before.
Used by Lantern, a browser-only slideshow app, to fill the background behind people when a 3D camera move reveals it. Inference runs entirely on the user's device.
| File | Size | SHA-256 |
|---|---|---|
lama_fp16w.onnx |
106,291,403 bytes | e631637d760e3fa708c059ebc304c66a4867f00ad0891cf4fc0849966a42ecab |
convert_fp16_weights.py |
Script that produced it from lama_fp32.onnx |
image: float32 [1, 3, 512, 512], RGB in 0–1, with the pixels to fill set to 0mask: float32 [1, 1, 512, 512], 1 = fill, 0 = keepoutput: float32 [1, 3, 512, 512], RGB in 0–255Compared with lama_fp32.onnx on a 35 %-of-frame hole: mean absolute difference 0.56 levels (of
255) inside the hole, maximum 10. 8-bit dynamic quantization was tried and is unusable (mean error
over 100 levels).
Apache-2.0, as the original LaMa code and weights and the Carve ONNX export.