2023-05-18 16:26:33 +02:00
< p align = "center" >
< img alt = "logo" height = 256 src = "./assets/logo.png" / >
< / p >
2022-07-22 17:20:12 +02:00
< h1 align = "center" > Lama Cleaner< / h1 >
< p align = "center" > A free and open-source inpainting tool powered by SOTA AI model.< / p >
< p align = "center" >
< a href = "https://github.com/Sanster/lama-cleaner" >
< img alt = "total download" src = "https://pepy.tech/badge/lama-cleaner" / >
< / a >
< a href = "https://pypi.org/project/lama-cleaner/" >
< img alt = "version" src = "https://img.shields.io/pypi/v/lama-cleaner" / >
< / a >
< a href = "https://colab.research.google.com/drive/1e3ZkAJxvkK3uzaTGu91N9TvI_Mahs0Wb?usp=sharing" >
< img alt = "Open in Colab" src = "https://colab.research.google.com/assets/colab-badge.svg" / >
< / a >
2022-11-21 07:02:44 +01:00
2022-11-16 14:18:51 +01:00
< a href = "https://huggingface.co/spaces/Sanster/Lama-Cleaner-lama" >
< img alt = "Hugging Face Spaces" src = "https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue" / >
< / a >
2022-11-21 07:02:44 +01:00
2022-12-11 15:50:37 +01:00
< a href = "" >
< img alt = "python version" src = "https://img.shields.io/pypi/pyversions/lama-cleaner" / >
2022-10-09 15:32:13 +02:00
< / a >
2022-10-08 06:55:51 +02:00
< a href = "https://hub.docker.com/r/cwq1913/lama-cleaner" >
< img alt = "version" src = "https://img.shields.io/docker/pulls/cwq1913/lama-cleaner" / >
< / a >
2022-07-22 17:20:12 +02:00
< / p >
2022-10-20 16:36:32 +02:00
https://user-images.githubusercontent.com/3998421/196976498-ba1ad3ab-fa18-4c55-965f-5c6683141375.mp4
2022-07-22 17:20:12 +02:00
## Features
2023-04-01 15:05:16 +02:00
- Completely free and open-source, fully self-hosted, support CPU & GPU & M1/2
2023-01-17 14:10:06 +01:00
- [Windows 1-Click Installer ](https://lama-cleaner-docs.vercel.app/install/windows_1click_installer )
2023-09-01 04:16:56 +02:00
- [Native macOS app ](https://opticlean.io/ )
2023-01-28 07:56:32 +01:00
- Multiple SOTA AI [models ](https://lama-cleaner-docs.vercel.app/models )
2023-04-01 15:05:16 +02:00
- Erase model: LaMa/LDM/ZITS/MAT/FcF/Manga
- Erase and Replace model: Stable Diffusion/Paint by Example
- [Plugins ](https://lama-cleaner-docs.vercel.app/plugins ) for post-processing:
- [RemoveBG ](https://github.com/danielgatis/rembg ): Remove images background
- [RealESRGAN ](https://github.com/xinntao/Real-ESRGAN ): Super Resolution
- [GFPGAN ](https://github.com/TencentARC/GFPGAN ): Face Restoration
- [RestoreFormer ](https://github.com/wzhouxiff/RestoreFormer ): Face Restoration
2023-04-13 15:29:48 +02:00
- [Segment Anything ](https://lama-cleaner-docs.vercel.app/plugins#interactive-segmentation ): Accurate and fast interactive object segmentation
2023-08-25 15:45:45 +02:00
- [FileManager ](https://lama-cleaner-docs.vercel.app/features/file_manager ): Browse your pictures conveniently and save them directly to the output directory.
2023-11-01 02:20:35 +01:00
- [Docker Image ](https://lama-cleaner-docs.vercel.app/install/docker )
2023-01-17 14:10:06 +01:00
- More features at [lama-cleaner-docs ](https://lama-cleaner-docs.vercel.app/ )
2021-12-12 07:54:37 +01:00
2022-07-22 17:20:12 +02:00
## Quick Start
2021-11-15 08:22:34 +01:00
2023-01-17 14:10:06 +01:00
Lama Cleaner make it easy to use SOTA AI model in just two commands:
2022-10-05 17:15:09 +02:00
2022-04-18 16:40:23 +02:00
```bash
2023-02-28 14:43:11 +01:00
# In order to use the GPU, install cuda version of pytorch first.
2023-04-10 03:16:35 +02:00
# pip install torch==1.13.1+cu117 torchvision==0.14.1 --extra-index-url https://download.pytorch.org/whl/cu117
2022-04-18 16:40:23 +02:00
pip install lama-cleaner
2022-07-22 17:20:12 +02:00
lama-cleaner --model=lama --device=cpu --port=8080
2022-04-18 16:40:23 +02:00
```
2023-01-17 14:10:06 +01:00
That's it, Lama Cleaner is now running at http://localhost:8080
2022-11-21 07:02:44 +01:00
2023-01-17 14:21:54 +01:00
See all command line arguments at [lama-cleaner-docs ](https://lama-cleaner-docs.vercel.app/install/pip )
2022-07-25 04:16:01 +02:00
2021-11-15 08:22:34 +01:00
## Development
2022-02-05 12:58:25 +01:00
Only needed if you plan to modify the frontend and recompile yourself.
2022-04-25 15:08:19 +02:00
### Frontend
2021-11-15 08:22:34 +01:00
2022-03-04 06:44:53 +01:00
Frontend code are modified from [cleanup.pictures ](https://github.com/initml/cleanup.pictures ), You can experience their
great online services [here ](https://cleanup.pictures/ ).
2021-11-15 08:22:34 +01:00
2023-01-25 14:39:44 +01:00
- Install dependencies:`cd lama_cleaner/app/ && pnpm install`
- Start development server: `pnpm start`
- Build: `pnpm build`