Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -67,19 +67,6 @@ from pixel3dmm.run_facer_segmentation import segment
|
|
| 67 |
|
| 68 |
DEVICE = "cuda"
|
| 69 |
|
| 70 |
-
import facer
|
| 71 |
-
from pixel3dmm.lightning.p3dmm_system import system as p3dmm_system
|
| 72 |
-
|
| 73 |
-
normal_model = p3dmm_system.load_from_checkpoint(f"{env_paths.CKPT_N_PRED}", strict=False)
|
| 74 |
-
normal_model = normal_model.eval().to(DEVICE)
|
| 75 |
-
|
| 76 |
-
uv_model = p3dmm_system.load_from_checkpoint(f"{env_paths.CKPT_UV_PRED}", strict=False)
|
| 77 |
-
uv_model = uv_model.eval().to(DEVICE)
|
| 78 |
-
|
| 79 |
-
face_detector = facer.face_detector('retinaface/mobilenet', device=DEVICE)
|
| 80 |
-
face_parser = facer.face_parser ('farl/celebm/448', device=DEVICE)
|
| 81 |
-
|
| 82 |
-
|
| 83 |
# 2. Empty cache for our heavy objects
|
| 84 |
_model_cache = {}
|
| 85 |
|
|
|
|
| 67 |
|
| 68 |
DEVICE = "cuda"
|
| 69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
# 2. Empty cache for our heavy objects
|
| 71 |
_model_cache = {}
|
| 72 |
|