Spaces:
Runtime error
Runtime error
jassinghNY
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
import torch
|
2 |
from typing import List
|
3 |
from pydantic import BaseModel
|
4 |
from lama_cleaner.server import main
|
@@ -17,7 +16,7 @@ class FakeArgs(BaseModel):
|
|
17 |
sd_run_local: bool = False
|
18 |
local_files_only: bool = False
|
19 |
cpu_offload: bool = False
|
20 |
-
device: str = "
|
21 |
gui: bool = False
|
22 |
gui_size: List[int] = [1000, 1000]
|
23 |
input: str = ''
|
@@ -28,12 +27,12 @@ class FakeArgs(BaseModel):
|
|
28 |
enable_xformers: bool = False
|
29 |
enable_interactive_seg: bool = True
|
30 |
interactive_seg_model: str = "vit_b"
|
31 |
-
interactive_seg_device: str = "
|
32 |
enable_remove_bg: bool = False
|
33 |
enable_anime_seg: bool = False
|
34 |
enable_realesrgan: bool = False
|
35 |
enable_gfpgan: bool = False
|
36 |
-
gfpgan_device: str = "
|
37 |
enable_restoreformer: bool = False
|
38 |
enable_gif: bool = False
|
39 |
quality: int = 95
|
@@ -41,11 +40,4 @@ class FakeArgs(BaseModel):
|
|
41 |
output_dir: str = None
|
42 |
|
43 |
if __name__ == "__main__":
|
44 |
-
|
45 |
-
print("CUDA is available. Using GPU.")
|
46 |
-
else:
|
47 |
-
print("CUDA is not available. Using CPU.")
|
48 |
-
|
49 |
-
args = FakeArgs()
|
50 |
-
print(f"Using device: {args.device}")
|
51 |
-
main(args)
|
|
|
|
|
1 |
from typing import List
|
2 |
from pydantic import BaseModel
|
3 |
from lama_cleaner.server import main
|
|
|
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 = ''
|
|
|
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
|
|
|
40 |
output_dir: str = None
|
41 |
|
42 |
if __name__ == "__main__":
|
43 |
+
main(FakeArgs())
|
|
|
|
|
|
|
|
|
|
|
|
|
|