On-device
LiteRT
(
.tflite
) build of
LaMa-Dilated
large-mask image inpainting: paint a mask over an unwanted
object and the model fills the region naturally.
This is the
LaMa-Dilated
variant (FFT blocks replaced with dilated
convolutions for GPU friendliness), obtained from
Qualcomm AI Hub
. It is a
pure CNN
— all 361 ops are LiteRT GPU-native (no Flex ops, no CPU fallback
on Qualcomm GPUs).
Files
File
Size
Description
lama_dilated.tflite
174 MB
FP32 single-graph model
I/O
Inputs
(NHWC, both
[0, 1]
):
image
[1, 512, 512, 3]
— RGB
mask
[1, 512, 512, 1]
— single channel,
1 = region to inpaint
, 0 = keep
Output
:
painted_image
[1, 512, 512, 3]
— inpainted RGB
The model preserves the unmasked region exactly and only synthesizes inside the
mask.
Usage (Android, LiteRT CompiledModel)
val model = CompiledModel.create(
context.assets, "lama_dilated.tflite",
CompiledModel.Options(Accelerator.GPU), null
)
val inputs = model.createInputBuffers()
val outputs = model.createOutputBuffers()
inputs[0].writeFloat(imageFloats) // [1,512,512,3] RGB [0,1]
inputs[1].writeFloat(maskFloats) // [1,512,512,1] 1=hole
model.run(inputs, outputs)
val painted = outputs[0].readFloat() // [1,512,512,3]
On-device note
The graph contains 3
TRANSPOSE_CONV
ops. These run on Qualcomm Adreno GPUs
(the hardware Qualcomm AI Hub optimized for). Some other GPU delegates may not
accept
TRANSPOSE_CONV
; verify on your target device.
LaMa-Dilated-LiteRT huggingface.co is an AI model on huggingface.co that provides LaMa-Dilated-LiteRT's model effect (), which can be used instantly with this mlboydaisuke LaMa-Dilated-LiteRT model. huggingface.co supports a free trial of the LaMa-Dilated-LiteRT model, and also provides paid use of the LaMa-Dilated-LiteRT. Support call LaMa-Dilated-LiteRT model through api, including Node.js, Python, http.
LaMa-Dilated-LiteRT huggingface.co is an online trial and call api platform, which integrates LaMa-Dilated-LiteRT's modeling effects, including api services, and provides a free online trial of LaMa-Dilated-LiteRT, you can try LaMa-Dilated-LiteRT online for free by clicking the link below.
mlboydaisuke LaMa-Dilated-LiteRT online free url in huggingface.co:
LaMa-Dilated-LiteRT is an open source model from GitHub that offers a free installation service, and any user can find LaMa-Dilated-LiteRT on GitHub to install. At the same time, huggingface.co provides the effect of LaMa-Dilated-LiteRT install, users can directly use LaMa-Dilated-LiteRT installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
LaMa-Dilated-LiteRT install url in huggingface.co: