Lama-cleaner

Latest version: v1.2.5

Safety actively analyzes 685670 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 8

0.30.2

fix sd model `--no-half`. On 3080, need 6.8G(4.1G without --no-half) for 512x512 image with `--sd-disable-nsfw` `--sd-cpu-textencoder`.

0.30.1

On some GPU(https://github.com/Sanster/lama-cleaner/issues/167) sd model might get a black image, it's probably because of fp16 precision, add a new `--no-half` option to the startup command, please upgrade to 0.30.1 to use this arg(for one-click installer, rerun win_config.bat will install the newest version of lama-cleaner)

0.30.0

Paint by Example

New model `--model paint_by_example` from https://github.com/Fantasy-Studio/Paint-by-Example.

This model is really interesting, you can use an example image to guide the model to generate similar content and no prompt is needed. I like the bunny one most, which one do you like? Click the bunny image to see how to use this model, have fun!


| Original Image | Example Image | Result Image |
|----|------|-------|
|<img src="https://user-images.githubusercontent.com/3998421/206908542-c6465ca3-6414-4593-8318-0c8b569e7682.jpg">|[<img src="https://user-images.githubusercontent.com/3998421/206908517-bd7f62d2-464a-43bc-892e-dbea45f7b104.jpeg">](https://youtu.be/NSAN3TzfhaI)|[<img src="https://user-images.githubusercontent.com/3998421/206903752-0463a0cf-146d-4125-a969-8fe20127a09b.jpeg">](https://youtu.be/NSAN3TzfhaI)|

|cat|bird|
|--|--|
|![jack_sparrow_cleanup_cat](https://user-images.githubusercontent.com/3998421/206903745-0fca4067-817f-4389-b774-b6527a3ee7a2.jpeg)|![jack_sparrow_cleanup_bird](https://user-images.githubusercontent.com/3998421/206903756-0e7c4537-2645-4916-96aa-3fb75352260d.jpeg)|

|bear|panda|
|--|--|
|![jack_sparrow_cleanup_bear](https://user-images.githubusercontent.com/3998421/206903763-2190cc52-692f-46ed-a454-bc8204b37b6f.jpeg)|![jack_sparrow_cleanup_panda](https://user-images.githubusercontent.com/3998421/206903872-42e6ff08-2cf9-44ac-9948-e01a7e848f23.jpeg)|

0.29.0

![img](https://github.com/Stability-AI/stablediffusion/blob/main/assets/stable-inpainting/merged-leopards.png)

- New model `--model sd2` : [Stable Diffusion 2](https://github.com/Stability-AI/stablediffusion)
- New sampler `dpm++`: [DPMSolverMultistepScheduler](https://huggingface.co/docs/diffusers/v0.9.0/en/api/schedulers#diffusers.DPMSolverMultistepScheduler) Empirically, sampling by DPM-Solver with only 20 steps can generate high-quality samples, and it can generate quite good samples even in only 10 steps.
- New device `--device mps`: M1/M2 Apple Silicon support, make sure your torch version is `1.13.0`. In theory, Lama Cleaner's code is device agnostic, but I don't have an M1 device to test it on, so if you encounter any problems, please try to provide a full screenshot of the error when opening an issue. Or just submit a PR to fix the problem, I'd appreciate it! ☮️ ✌️

0.28.0

Stable Diffusion
- Add match histogram option https://github.com/Sanster/lama-cleaner/pull/143, Match the inpainting result histogram to the source image histogram, which will improve the inpainting quality for some images.
- Add `--sd-enable-xformers` command line arg https://github.com/Sanster/lama-cleaner/pull/146, which gives a big boost in speed while also reducing GPU memory usage significantly. To use this option you need to Install `https://github.com/facebookresearch/xformers` first

Interactive Segmentation
In this release, Lama Cleaner integrates with a small model(so it can run on CPU) from [ClickSEG](https://github.com/XavierCHEN34/ClickSEG). I have wanted to add this feature for a long time, it's fun and useful in many scenarios.

The basic operation process is as follows:
- Enable `Interactive Segmentation` by clicking the button on the bottom toolbar, or by shortcut `i`
- Left click meaning `position click` (include things you want to mask)
- Right click meaning `negative click`(exclude things you want to mask)
- Complete the mask with the brush (If the result of interactive segmentation is not so good)
- Inpainting!

https://user-images.githubusercontent.com/3998421/205301195-f497922a-1037-4501-a865-d140a7455331.mp4

0.27.1

Manga inpainting model from: https://github.com/msxie92/MangaInpainting

Manga model works better on high-quality manga image then LaMa model.

Original Image

![manga](https://raw.githubusercontent.com/Sanster/lama-cleaner/main/assets/manga.png)

| Model | 1080x740 | 1470x1010 |
|--------|------------|------------|
|Manga|![manga_1080x740](https://user-images.githubusercontent.com/3998421/202676629-54f40f20-c55b-4e6d-bcc7-0a4e81fbb27d.png)|![manga_1470x1010](https://user-images.githubusercontent.com/3998421/202675839-4f8012d5-1c10-47ea-9628-20512e86f192.png)|
|[LaMa](https://github.com/saic-mdal/lama)|![lama_1080x740](https://user-images.githubusercontent.com/3998421/202675704-53fa7a3d-ec74-4044-a19c-c673d74bdd28.png)|![lama_1470x1010](https://user-images.githubusercontent.com/3998421/202675746-1e642367-f5d0-4b48-aa8b-5d82f2e29082.png)|

Page 3 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.