update README
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@
|
|||||||
**/__pycache__
|
**/__pycache__
|
||||||
examples/
|
examples/
|
||||||
.idea/
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
|||||||
52
README.md
52
README.md
@@ -3,8 +3,8 @@
|
|||||||
https://user-images.githubusercontent.com/3998421/153323093-b664bb68-2928-480b-b59b-7c1ee24a4507.mp4
|
https://user-images.githubusercontent.com/3998421/153323093-b664bb68-2928-480b-b59b-7c1ee24a4507.mp4
|
||||||
|
|
||||||
- [x] Support multiple model architectures
|
- [x] Support multiple model architectures
|
||||||
1. [LaMa](https://github.com/saic-mdal/lama)
|
1. [LaMa](https://github.com/saic-mdal/lama)
|
||||||
1. [LDM](https://github.com/CompVis/latent-diffusion)
|
1. [LDM](https://github.com/CompVis/latent-diffusion)
|
||||||
- [x] High resolution support
|
- [x] High resolution support
|
||||||
- [x] Multi stroke support. Press and hold the `cmd/ctrl` key to enable multi stroke mode.
|
- [x] Multi stroke support. Press and hold the `cmd/ctrl` key to enable multi stroke mode.
|
||||||
- [x] Zoom & Pan
|
- [x] Zoom & Pan
|
||||||
@@ -12,40 +12,30 @@ https://user-images.githubusercontent.com/3998421/153323093-b664bb68-2928-480b-b
|
|||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
Install requirements: `pip3 install -r requirements.txt`
|
1. Install requirements: `pip3 install -r requirements.txt`
|
||||||
|
2. Start server: `python3 main.py`, open http://localhost:8080
|
||||||
|
|
||||||
### Start server with LaMa model
|
Available commands for `main.py`
|
||||||
|
|
||||||
```bash
|
| Name | Description | Default |
|
||||||
python3 main.py --device=cuda --port=8080 --model=lama
|
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------- |
|
||||||
```
|
| --model | lama or ldm. See details in **Model Comparison** | lama |
|
||||||
|
| --device | cuda or cpu | cuda |
|
||||||
|
| --ldm-steps | The larger the value, the better the result, but it will be more time-consuming | 50 |
|
||||||
|
| --crop-trigger-size | If image size large then crop-trigger-size, crop each area from original image to do inference. Mainly for performance and memory reasons on **very** large image. | 2042,2042 |
|
||||||
|
| --crop-margin | Margin around bounding box of painted stroke when crop mode triggered. | 256 |
|
||||||
|
| --port | Port for web server | 8080 |
|
||||||
|
| --gui | Launch lama-cleaner as a desktop application | |
|
||||||
|
| --gui_size | Set the window size for the application | 1200 900 |
|
||||||
|
|
||||||
- `--crop-trigger-size`: If image size large then crop-trigger-size, crop each area from original image to do inference.
|
## Model Comparison
|
||||||
Mainly for performance and memory reasons on **very** large image.Default is 2042,2042
|
|
||||||
- `--crop-margin`: Margin around bounding box of painted stroke when crop mode triggered. Default is 256.
|
|
||||||
|
|
||||||
### Start server with LDM model
|
Diffusion model(ldm) is **MUCH MORE** slower than GANs(lama)(1080x720 image takes 8s on 3090), but it's possible to get better
|
||||||
|
result, see below example:
|
||||||
|
|
||||||
```bash
|
| Original Image | LaMa | LDM |
|
||||||
python3 main.py --device=cuda --port=8080 --model=ldm --ldm-steps=50
|
| ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
```
|
|  |  |  |
|
||||||
|
|
||||||
`--ldm-steps`: The larger the value, the better the result, but it will be more time-consuming
|
|
||||||
|
|
||||||
Diffusion model is **MUCH MORE** slower than GANs(1080x720 image takes 8s on 3090), but it's possible to get better
|
|
||||||
results than LaMa.
|
|
||||||
|
|
||||||
### GUI
|
|
||||||
|
|
||||||
You can run lama-cleaner as a desktop application using the following command line arguments.
|
|
||||||
|
|
||||||
`--gui`: Launch lama-cleaner as a desktop application
|
|
||||||
|
|
||||||
`--gui_size`: Set the window size for the application. Usage: --gui_size 1200 900
|
|
||||||
|
|
||||||
|Original Image|LaMa|LDM|
|
|
||||||
|--------------|------|----|
|
|
||||||
||||
|
|
||||||
|
|
||||||
Blogs about diffusion models:
|
Blogs about diffusion models:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user