图像编辑与放大Apache-2.0Python

LaMa

Resolution-robust large-mask inpainting with Fourier convolutions.

Star 数
10.4K
Fork 数
1.1K
未关闭 Issue
132
最近提交
2025-02-05

数据来自 GitHub API · 更新于 2026-11-30

LaMa 是什么?

LaMa (WACV 2022) is the inpainting model behind many object-removal tools. Its fast Fourier convolutions give it an image-wide receptive field, so it fills large masked areas with plausible textures even at high resolution.

主要功能

  • Large-mask inpainting
  • Generalizes to ~2K resolution
  • Pretrained models and training code
  • Basis for IOPaint and similar tools

系统要求

平台
Linux · Windows · Docker
显卡
Optional
Python
3.8+

如何安装 LaMa

根据项目 README 整理。开源项目更新很快,请以 GitHub 页面上的最新说明为准。

From source

  1. 1
    Clone and install the requirements.
    git clone https://github.com/advimman/lama.git
    cd lama
    pip install -r requirements.txt
  2. 2
    Download big-lama from the README link, then inpaint a folder of images + masks.
    python3 bin/predict.py model.path=$(pwd)/big-lama indir=$(pwd)/input outdir=$(pwd)/output

优势

  • Excellent object removal
  • Lightweight

不足

  • Research code; IOPaint is easier for end users

LaMa 替代品对比

软件Star 数许可证平台显存
LaMa

Resolution-robust large-mask inpainting with Fourier convolutions.

10.4KApache-2.0—
IOPaint

Erase objects, watermarks and people with AI inpainting (formerly Lama Cleaner).

23.3KApache-2.0—
Inpaint Anything

Click an object to remove, fill or replace it using SAM + inpainting.

7.7KApache-2.0—
SAM 2

Segment Anything for images and video, with object tracking.

20.3KApache-2.0—
Upscayl

Free desktop app that upscales images with AI.

53.4KAGPL-3.0—
Real-ESRGAN

Practical image and video super-resolution models.

37.8KBSD-3-Clause—

常见问题

LaMa 免费吗?

是的——LaMa 是开源软件,采用 Apache-2.0 许可证。商用前请确认软件及模型权重的许可条款。

LaMa 支持 Windows、Mac 和 Linux 吗?

LaMa 支持:Linux, Windows, Docker。

运行 LaMa 需要什么配置?

Optional

如何安装 LaMa?

1. Clone and install the requirements. 2. Download big-lama from the README link, then inpaint a folder of images + masks.

LaMa 有哪些好的替代品?

常见替代品包括 IOPaint, Inpaint Anything, SAM 2, Upscayl,详见本页对比表。

可以不安装、在线使用 LaMa 吗?

如果只想要结果,AiLoft 可在浏览器中运行 GPT Image 2.5、Nano Banana Pro 等顶级图像模型,无需显卡和配置。

不想安装?直接在浏览器里生成图片

无需显卡、驱动或 Python。在线使用 GPT Image 2.5 和 Nano Banana Pro,并排对比效果。