upgrade nerfacc to 0.3.x with CUB accel (#1187)

This commit is contained in:
Ruilong Li(李瑞龙) authored and GitHub committed 2022-12-31 07:28:11 +08:00
1 parent e01f5caa53
commit 028df82be6
3 files changed
+7 -8

No files matched your search

+2 -1
View File
@@ -170,7 +170,7 @@ class NGPModel(Model):
num_rays = len(ray_bundle)
with torch.no_grad():
ray_samples, packed_info, ray_indices = self.sampler(
ray_samples, ray_indices = self.sampler(
ray_bundle=ray_bundle,
near_plane=self.config.near_plane,
far_plane=self.config.far_plane,
@@ -181,6 +181,7 @@ class NGPModel(Model):
field_outputs = self.field(ray_samples)
# accumulation
packed_info = nerfacc.pack_info(ray_indices, num_rays)
weights = nerfacc.render_weight_from_density(
packed_info=packed_info,
sigmas=field_outputs[FieldHeadNames.DENSITY],