xrg
commited on
Commit
•
cbf7cc7
1
Parent(s):
f9e1b03
update debug info
Browse files- app.py +2 -0
- core/models.py +3 -0
app.py
CHANGED
@@ -82,6 +82,8 @@ if opt.resume is not None:
|
|
82 |
print(f'[INFO] load resume success!')
|
83 |
|
84 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
|
|
|
|
85 |
model = model.half().to(device)
|
86 |
model.eval()
|
87 |
|
|
|
82 |
print(f'[INFO] load resume success!')
|
83 |
|
84 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
85 |
+
print('first device')
|
86 |
+
print(device)
|
87 |
model = model.half().to(device)
|
88 |
model.eval()
|
89 |
|
core/models.py
CHANGED
@@ -52,6 +52,9 @@ class LTRFM_NeRF(nn.Module):
|
|
52 |
aabb = torch.tensor([[-1, -1, -1], [1, 1, 1]]).to(device)
|
53 |
grid_size = torch.tensor([opt.splat_size, opt.splat_size, opt.splat_size]).to(device)
|
54 |
near_far =torch.tensor([opt.znear, opt.zfar]).to(device)
|
|
|
|
|
|
|
55 |
# tensorf Renderer
|
56 |
self.tensorRF = TensorVMSplit_NeRF(aabb, grid_size, density_n_comp=opt.density_n_comp,appearance_n_comp=opt.app_n_comp,app_dim=opt.app_dim,\
|
57 |
density_dim=opt.density_dim,near_far=near_far, shadingMode=opt.shadingMode, pos_pe=opt.pos_pe, view_pe=opt.view_pe, fea_pe=opt.fea_pe)
|
|
|
52 |
aabb = torch.tensor([[-1, -1, -1], [1, 1, 1]]).to(device)
|
53 |
grid_size = torch.tensor([opt.splat_size, opt.splat_size, opt.splat_size]).to(device)
|
54 |
near_far =torch.tensor([opt.znear, opt.zfar]).to(device)
|
55 |
+
|
56 |
+
print(device)
|
57 |
+
print('aabb')
|
58 |
# tensorf Renderer
|
59 |
self.tensorRF = TensorVMSplit_NeRF(aabb, grid_size, density_n_comp=opt.density_n_comp,appearance_n_comp=opt.app_n_comp,app_dim=opt.app_dim,\
|
60 |
density_dim=opt.density_dim,near_far=near_far, shadingMode=opt.shadingMode, pos_pe=opt.pos_pe, view_pe=opt.view_pe, fea_pe=opt.fea_pe)
|