Spaces:
Running
on
L40S
Running
on
L40S
Upload ./svrm/ldm/models/svrm.py with huggingface_hub
Browse files- svrm/ldm/models/svrm.py +2 -0
svrm/ldm/models/svrm.py
CHANGED
|
@@ -23,6 +23,7 @@
|
|
| 23 |
# by Tencent in accordance with TENCENT HUNYUAN COMMUNITY LICENSE AGREEMENT.
|
| 24 |
|
| 25 |
import os
|
|
|
|
| 26 |
import time
|
| 27 |
import math
|
| 28 |
import cv2
|
|
@@ -165,6 +166,7 @@ class SVRMModel(torch.nn.Module):
|
|
| 165 |
triplane_gen = self.img_to_triplane_decoder(input_view_feat) # [b, 3, tri_dim, h, w]
|
| 166 |
del input_view_feat
|
| 167 |
torch.cuda.empty_cache()
|
|
|
|
| 168 |
|
| 169 |
# --- triplane nerf render
|
| 170 |
|
|
|
|
| 23 |
# by Tencent in accordance with TENCENT HUNYUAN COMMUNITY LICENSE AGREEMENT.
|
| 24 |
|
| 25 |
import os
|
| 26 |
+
import gc
|
| 27 |
import time
|
| 28 |
import math
|
| 29 |
import cv2
|
|
|
|
| 166 |
triplane_gen = self.img_to_triplane_decoder(input_view_feat) # [b, 3, tri_dim, h, w]
|
| 167 |
del input_view_feat
|
| 168 |
torch.cuda.empty_cache()
|
| 169 |
+
gc.collect()
|
| 170 |
|
| 171 |
# --- triplane nerf render
|
| 172 |
|