Merge pull request #71 from Sanster/add_sd

Stable Diffusion
This commit is contained in:
Qing
2022-09-22 22:54:15 +08:00
committed by GitHub
55 changed files with 2550 additions and 248 deletions

View File

@@ -28,6 +28,7 @@
1. [ZITS](https://github.com/DQiaole/ZITS_inpainting)
1. [MAT](https://github.com/fenglinglwb/MAT)
1. [FcF](https://github.com/SHI-Labs/FcF-Inpainting)
1. [SD1.4](https://github.com/CompVis/stable-diffusion)
- Support CPU & GPU
- Various inpainting [strategy](#inpainting-strategy)
- Run as a desktop APP
@@ -41,6 +42,7 @@
| Remove Text | ![text](./assets/unwant_text.jpg) | ![text](./assets/unwant_text_clean.jpg) |
| Remove watermark | ![watermark](./assets/watermark.jpg) | ![watermark_clean](./assets/watermark_cleanup.jpg) |
| Fix old photo | ![oldphoto](./assets/old_photo.jpg) | ![oldphoto_clean](./assets/old_photo_clean.jpg) |
| Text Driven Inpainting | ![dog](./assets/dog.jpg) | ![fox](./assets/fox.jpg) |
## Quick Start
@@ -54,15 +56,16 @@ lama-cleaner --model=lama --device=cpu --port=8080
Available arguments:
| Name | Description | Default |
| ---------- | ---------------------------------------------------------------- | -------- |
| --model | lama/ldm/zits. See details in [Inpaint Model](#inpainting-model) | lama |
| --device | cuda or cpu | cuda |
| --port | Port for backend flask web server | 8080 |
| --gui | Launch lama-cleaner as a desktop application | |
| --gui_size | Set the window size for the application | 1200 900 |
| --input | Path to image you want to load by default | None |
| --debug | Enable debug mode for flask web server | |
| Name | Description | Default |
| ----------------- | -------------------------------------------------------------------------------------------------------- | -------- |
| --model | lama/ldm/zits/mat/fcf/sd. See details in [Inpaint Model](#inpainting-model) | lama |
| --hf_access_token | stable-diffusion(sd) model need huggingface access token https://huggingface.co/docs/hub/security-tokens | |
| --device | cuda or cpu | cuda |
| --port | Port for backend flask web server | 8080 |
| --gui | Launch lama-cleaner as a desktop application | |
| --gui_size | Set the window size for the application | 1200 900 |
| --input | Path to image you want to load by default | None |
| --debug | Enable debug mode for flask web server | |
## Inpainting Model
@@ -73,6 +76,7 @@ Available arguments:
| ZITS | :+1: Better holistic structures compared with previous methods <br/> :neutral_face: Wireframe module is **very** slow on CPU | `Wireframe`: Enable edge and line detect |
| MAT | TODO | |
| FcF | :+1: Better structure and texture generation <br/> :neutral_face: Only support fixed size (512x512) input | |
| SD1.4 | :+1: SOTA text-to-image diffusion model | |
### LaMa vs LDM