Practical overview
When it fits
Use LaMa when you need an inpainting model for masked image regions and can prepare paired image and mask files or build the surrounding editing interface.
Who it is for
- Developers building image editors with masked object removal or replacement.
- Teams creating batch workflows to repair damaged or incomplete images.
- Computer-vision practitioners working with image completion, including repeated or periodic patterns.
Documented uses
- Fill a selected or masked region of an image.
- Process image-and-mask pairs through a local inference workflow.
- Explore completion of periodic patterns and images at resolutions around 2K.
Requirements & limits
The repository is public and specifies an Apache-2.0 license. Its README links to a Google Colab tryout and documents local inference options.
- The repository supplies model inference rather than a finished general-purpose editing application.
- Input images and masks must be prepared as matching pairs; the README specifies the filename pattern and image_suffix setting.
- The README documents Python virtualenv, Conda and Docker environment choices, with particular package versions for its Python and Conda instructions.
- Pretrained model files are separate downloads; the README identifies a Places2 option and a Google Drive folder for model files.
- The README describes performance at around 2K resolution and periodic-pattern completion; these are project claims, not independent benchmarks.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Run repository inference on prepared images
Use the documented prediction workflow to generate inpainted image outputs from image-and-mask pairs.
Before you start
- A cloned LaMa repository and one of its documented environments: Python virtualenv, Conda or Docker.
- A downloaded pretrained model; the README lists a Places2 model and a Google Drive folder for model files.
- Images and masks in the same folder, named as matching pairs such as image1.png and image1_mask001.png.
- Set image_suffix in configs/prediction/default.yaml to match the image filenames.
Steps
In the repository, set TORCH_HOME and PYTHONPATH to the repository directory as shown in the README.
Download and unpack a pretrained model using one of the documented model sources.
Prepare paired images and masks using the documented filename pattern; set image_suffix in the prediction configuration.
Run the documented host prediction command with model.path, indir and outdir set to the model, input and output paths; alternatively use a documented Docker prediction script.
Expected outcome
The prediction workflow writes inpainted results to the specified output directory.
Guide limitations
- This is a repository inference workflow, not a ready-made image-editing interface.
- The README notes that older Yandex model links no longer work.
- The guide describes documented setup and commands; it does not claim execution or compatibility testing.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- advimman/lama · Official homepage title · retained in its source language

