LaMa (ONNX) β€” texture inpainting for QtMeshEditor

Re-hosted ONNX export of LaMa (large-mask inpainting), used by QtMeshEditor to fill masked regions of a texture with plausible, seamlessly continued content (issue #1017).

  • Paper: Suvorov et al., "Resolution-robust Large Mask Inpainting with Fourier Convolutions", WACV 2022.
  • Licence: Apache-2.0 (code and weights).
  • Source graph: Carve/LaMa-ONNX.

Which file this is

The upstream repo publishes two graphs. The plainly-named lama.onnx there is broken β€” it fails ONNX Runtime shape inference on a DFT node (LaMa's Fourier convolution) and cannot be loaded at all:

Op (DFT) [ShapeInferenceError] one-sided DFT requires real input

This repo hosts the working lama_fp32.onnx under the plain name lama.onnx, which is what the application downloads.

I/O contract

Measured, not documented upstream:

name dtype shape range
input image float32 [1,3,512,512] RGB scaled to [0,1]
input mask float32 [1,1,512,512] 1 = inpaint, 0 = keep
output output float32 [1,3,512,512] RGB already in 0..255

Note the asymmetry β€” in [0,1], out 0..255. Feeding an un-scaled image produces a near-white result (measured mean 246.6 vs a correct 128.6) with no error raised.

Spatial dims are fixed, so larger textures are processed in overlapping 512Β² tiles with a feathered seam blend.

Measured behaviour

On a thin-seam mask (the UV-bleed repair case), against ground truth the model never saw:

  • reconstruction MAE 9.15 / 255 (3.6%) inside the mask
  • leakage MAE 0.0000 outside the mask β€” unmasked pixels are preserved exactly

Usage

Downloaded automatically on first use by QtMeshEditor. Also available in the aggregate repo QtMeshEditor-models under pbr/lama.onnx, which is the path the runtime fetches.

qtmesh material --texture albedo.png --inpaint --mask holes.png -o fixed.png
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support