Instructions to use mlboydaisuke/LaMa-Dilated-LiteRT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use mlboydaisuke/LaMa-Dilated-LiteRT with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
LaMa-Dilated β LiteRT (TFLite) GPU
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]β RGBmask[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.
License & attribution
- License: Apache-2.0.
- Original model: advimman/lama (LaMa, Β© 2021 Samsung Research), Apache-2.0.
- Converted/optimized
.tflitefrom Qualcomm AI Hub β lama_dilated. - This repository only re-hosts the LiteRT
.tflitefor convenient on-device use; all credit to the original authors and Qualcomm AI Hub.
- Downloads last month
- 9