charbel-malo
commited on
Commit
•
6b6cb6d
1
Parent(s):
49aa16b
Update face_enhancer.py
Browse files- face_enhancer.py +2 -3
face_enhancer.py
CHANGED
@@ -7,19 +7,18 @@ from upscaler.RealESRGAN import RealESRGAN
|
|
7 |
from upscaler.codeformer import CodeFormerEnhancer
|
8 |
import spaces
|
9 |
|
10 |
-
|
11 |
def gfpgan_runner(img, model):
|
12 |
_, imgs, _ = model.enhance(img, paste_back=True, has_aligned=True)
|
13 |
return imgs[0]
|
14 |
|
15 |
|
16 |
-
@spaces.GPU(enable_queue=True)
|
17 |
def realesrgan_runner(img, model):
|
18 |
img = model.predict(img)
|
19 |
return img
|
20 |
|
21 |
|
22 |
-
|
23 |
def codeformer_runner(img, model):
|
24 |
img = model.enhance(img)
|
25 |
return img
|
|
|
7 |
from upscaler.codeformer import CodeFormerEnhancer
|
8 |
import spaces
|
9 |
|
10 |
+
|
11 |
def gfpgan_runner(img, model):
|
12 |
_, imgs, _ = model.enhance(img, paste_back=True, has_aligned=True)
|
13 |
return imgs[0]
|
14 |
|
15 |
|
|
|
16 |
def realesrgan_runner(img, model):
|
17 |
img = model.predict(img)
|
18 |
return img
|
19 |
|
20 |
|
21 |
+
|
22 |
def codeformer_runner(img, model):
|
23 |
img = model.enhance(img)
|
24 |
return img
|