Spaces:
Running
Running
victorisgeek
commited on
Commit
•
d27d214
1
Parent(s):
2343c73
Update face_enhancer.py
Browse files- face_enhancer.py +2 -2
face_enhancer.py
CHANGED
@@ -38,7 +38,7 @@ supported_enhancers = {
|
|
38 |
"GFPGAN": ("./assets/pretrained_models/GFPGANv1.4.pth", gfpgan_runner),
|
39 |
"Real_Hatgan x4": ("./assets/pretrained_models/real_hatgan_x4.onnx", realhatgan_runner),
|
40 |
"Ultra_Sharp x4": ("./assets/pretrained_models/ultra_sharp_x4.onnx", ultrasharp_runner),
|
41 |
-
"RestoreFormer": ("./assets/pretrained_models/restoreformer_plus_plus.onnx", restoreformer_runner),
|
42 |
"REAL-ESRGAN 2x": ("./assets/pretrained_models/RealESRGAN_x2.pth", realesrgan_runner),
|
43 |
"REAL-ESRGAN 4x": ("./assets/pretrained_models/RealESRGAN_x4.pth", realesrgan_runner),
|
44 |
"REAL-ESRGAN 8x": ("./assets/pretrained_models/RealESRGAN_x8.pth", realesrgan_runner)
|
@@ -64,7 +64,7 @@ def load_face_enhancer_model(name='GFPGAN', device="cpu"):
|
|
64 |
model = CodeFormerEnhancer(model_path=model_path, device=device)
|
65 |
elif name == 'GFPGAN':
|
66 |
model = gfpgan.GFPGANer(model_path=model_path, upscale=1, device=device)
|
67 |
-
|
68 |
model = RestoreFormer(device, scale=1)
|
69 |
model.load_weights(model_path, download=False)
|
70 |
elif name == 'REAL-ESRGAN 4x':
|
|
|
38 |
"GFPGAN": ("./assets/pretrained_models/GFPGANv1.4.pth", gfpgan_runner),
|
39 |
"Real_Hatgan x4": ("./assets/pretrained_models/real_hatgan_x4.onnx", realhatgan_runner),
|
40 |
"Ultra_Sharp x4": ("./assets/pretrained_models/ultra_sharp_x4.onnx", ultrasharp_runner),
|
41 |
+
"RestoreFormer": ("./assets/pretrained_models/restoreformer_plus_plus.onnx", restoreformer_runner),
|
42 |
"REAL-ESRGAN 2x": ("./assets/pretrained_models/RealESRGAN_x2.pth", realesrgan_runner),
|
43 |
"REAL-ESRGAN 4x": ("./assets/pretrained_models/RealESRGAN_x4.pth", realesrgan_runner),
|
44 |
"REAL-ESRGAN 8x": ("./assets/pretrained_models/RealESRGAN_x8.pth", realesrgan_runner)
|
|
|
64 |
model = CodeFormerEnhancer(model_path=model_path, device=device)
|
65 |
elif name == 'GFPGAN':
|
66 |
model = gfpgan.GFPGANer(model_path=model_path, upscale=1, device=device)
|
67 |
+
elif name ='RestoreFormer':
|
68 |
model = RestoreFormer(device, scale=1)
|
69 |
model.load_weights(model_path, download=False)
|
70 |
elif name == 'REAL-ESRGAN 4x':
|