Upload 3 files
Browse files- README.md +9 -6
- app.py +43 -0
- requirements.txt +2 -0
README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
-
sdk:
|
|
|
|
|
|
|
| 7 |
pinned: false
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Lama Cleaner Lama
|
| 3 |
+
emoji: ⚡
|
| 4 |
+
colorFrom: indigo
|
| 5 |
+
colorTo: purple
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: 5.4.0
|
| 8 |
+
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
+
license: apache-2.0
|
| 11 |
---
|
| 12 |
|
| 13 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
app.py
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import List
|
| 2 |
+
from pydantic import BaseModel
|
| 3 |
+
from lama_cleaner.server import main
|
| 4 |
+
|
| 5 |
+
class FakeArgs(BaseModel):
|
| 6 |
+
host: str = "0.0.0.0"
|
| 7 |
+
port: int = 7860
|
| 8 |
+
model: str = 'lama'
|
| 9 |
+
hf_access_token: str = ""
|
| 10 |
+
sd_enable_xformers: bool = False
|
| 11 |
+
sd_disable_nsfw: bool = False
|
| 12 |
+
sd_cpu_textencoder: bool = True
|
| 13 |
+
sd_controlnet: bool = False
|
| 14 |
+
sd_controlnet_method: str = "control_v11p_sd15_canny"
|
| 15 |
+
sd_local_model_path: str = ""
|
| 16 |
+
sd_run_local: bool = False
|
| 17 |
+
local_files_only: bool = False
|
| 18 |
+
cpu_offload: bool = False
|
| 19 |
+
device: str = "cpu"
|
| 20 |
+
gui: bool = False
|
| 21 |
+
gui_size: List[int] = [1000, 1000]
|
| 22 |
+
input: str = ''
|
| 23 |
+
disable_model_switch: bool = True
|
| 24 |
+
debug: bool = False
|
| 25 |
+
no_half: bool = False
|
| 26 |
+
disable_nsfw: bool = False
|
| 27 |
+
enable_xformers: bool = False
|
| 28 |
+
enable_interactive_seg: bool = True
|
| 29 |
+
interactive_seg_model: str = "vit_b"
|
| 30 |
+
interactive_seg_device: str = "cpu"
|
| 31 |
+
enable_remove_bg: bool = False
|
| 32 |
+
enable_anime_seg: bool = False
|
| 33 |
+
enable_realesrgan: bool = False
|
| 34 |
+
enable_gfpgan: bool = False
|
| 35 |
+
gfpgan_device: str = "cpu"
|
| 36 |
+
enable_restoreformer: bool = False
|
| 37 |
+
enable_gif: bool = False
|
| 38 |
+
quality: int = 95
|
| 39 |
+
model_dir: str = None
|
| 40 |
+
output_dir: str = None
|
| 41 |
+
|
| 42 |
+
if __name__ == "__main__":
|
| 43 |
+
main(FakeArgs())
|
requirements.txt
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
lama-cleaner==1.2.5
|
| 2 |
+
huggingface_hub==0.13.2
|