Spaces:
Sleeping
Sleeping
Kingtous
commited on
Commit
·
df188b5
1
Parent(s):
263bedb
opt: move lama
Browse files
app.py
CHANGED
@@ -3,10 +3,10 @@ import spaces
|
|
3 |
import torch
|
4 |
from PIL import Image
|
5 |
from simple_lama_inpainting import SimpleLama
|
6 |
-
lama: SimpleLama = SimpleLama()
|
7 |
|
8 |
zero = torch.Tensor([0]).cuda()
|
9 |
print(zero.device) # <-- 'cpu' 🤔
|
|
|
10 |
|
11 |
@spaces.GPU
|
12 |
def lama_inpainting(image: Image, mask: Image) -> Image:
|
|
|
3 |
import torch
|
4 |
from PIL import Image
|
5 |
from simple_lama_inpainting import SimpleLama
|
|
|
6 |
|
7 |
zero = torch.Tensor([0]).cuda()
|
8 |
print(zero.device) # <-- 'cpu' 🤔
|
9 |
+
lama: SimpleLama = SimpleLama(device=zero.device)
|
10 |
|
11 |
@spaces.GPU
|
12 |
def lama_inpainting(image: Image, mask: Image) -> Image:
|