← all repositories
advimman/lama

A neural network that learned to see the big picture

Image inpainting that generalizes to 2K resolution despite never training above 256×256, thanks to Fourier convolutions.

10.1k stars Jupyter Notebook Image · Video · AudioComputer Vision
lama
Not currently ranked — collecting fresh signals.
star history

What it does

LaMa fills in missing chunks of images—object removal, damage repair, background completion—using a generative adversarial network. You provide an image and a mask; it hallucinates what should be underneath. The project ships with pre-trained models for places and faces, plus scripts for training your own.

The interesting bit

The trick is Fourier convolutions: operating in the frequency domain gives the model an effective “receptive field” large enough to capture periodic textures like brick patterns or floor tiles. That is why it can handle resolutions it never saw during training—roughly 2K, according to the authors—without the usual blur or repetition artifacts.

Key highlights

  • Trained at 256×256, generalizes to ~2K resolution (per the README)
  • Excels at periodic structures—think fences, windows, textiles
  • Pre-trained big-lama model available via Hugging Face and Google Drive
  • Docker image provided; CPU and GPU inference scripts included
  • Optional refinement pass for higher-quality results
  • Ecosystem of third-party ports: Core ML, pip package, Gradio demo, Telegram bot, PyQt5 GUI

Caveats

  • Original Yandex distribution links are dead; models moved to Google Drive
  • Several Docker and dataset preparation scripts are marked “TODO” in the README
  • Training requires substantial data: Places365-Standard is 105 GB, Places Challenge is 476 GB

Verdict

Worth a look if you need high-resolution inpainting and can tolerate some academic-code rough edges. Skip it if you want a polished consumer app; use one of the third-party wrappers instead.

Frequently asked

What is advimman/lama?
Image inpainting that generalizes to 2K resolution despite never training above 256×256, thanks to Fourier convolutions.
Is lama open source?
Yes — advimman/lama is open source, released under the Apache-2.0 license.
What language is lama written in?
advimman/lama is primarily written in Jupyter Notebook.
How popular is lama?
advimman/lama has 10.1k stars on GitHub.
Where can I find lama?
advimman/lama is on GitHub at https://github.com/advimman/lama.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.