Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -153,7 +153,6 @@ def step2_normals(session_id):
|
|
153 |
base_conf = OmegaConf.load("configs/base.yaml")
|
154 |
|
155 |
if "normals_model" not in _model_cache:
|
156 |
-
print("----caching normal models----")
|
157 |
model = p3dmm_system.load_from_checkpoint(f"{env_paths.CKPT_N_PRED}", strict=False)
|
158 |
model = model.eval().to(DEVICE)
|
159 |
_model_cache["normals_model"] = model
|
@@ -205,6 +204,7 @@ def step4_track(session_id):
|
|
205 |
|
206 |
# Lazy init + caching of FLAME model on GPU
|
207 |
if "flame_model" not in _model_cache:
|
|
|
208 |
|
209 |
flame = FLAME(tracking_conf) # CPU instantiation
|
210 |
flame = flame.to(DEVICE) # CUDA init happens here
|
|
|
153 |
base_conf = OmegaConf.load("configs/base.yaml")
|
154 |
|
155 |
if "normals_model" not in _model_cache:
|
|
|
156 |
model = p3dmm_system.load_from_checkpoint(f"{env_paths.CKPT_N_PRED}", strict=False)
|
157 |
model = model.eval().to(DEVICE)
|
158 |
_model_cache["normals_model"] = model
|
|
|
204 |
|
205 |
# Lazy init + caching of FLAME model on GPU
|
206 |
if "flame_model" not in _model_cache:
|
207 |
+
global _model_cache
|
208 |
|
209 |
flame = FLAME(tracking_conf) # CPU instantiation
|
210 |
flame = flame.to(DEVICE) # CUDA init happens here
|