Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
kerrj authored Mar 6, 2024
2 parents 2d7b568 + 6e6cedd commit 5732606
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nerfstudio/models/instant_ngp.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def get_metrics_dict(self, outputs, batch):
return metrics_dict

def get_loss_dict(self, outputs, batch, metrics_dict=None):
image = batch["image"][..., :3].to(self.device)
image = batch["image"].to(self.device)
pred_rgb, image = self.renderer_rgb.blend_background_for_loss_computation(
pred_image=outputs["rgb"],
pred_accumulation=outputs["accumulation"],
Expand Down
2 changes: 1 addition & 1 deletion nerfstudio/models/tensorf.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def get_outputs(self, ray_bundle: RayBundle):
def get_loss_dict(self, outputs, batch, metrics_dict=None) -> Dict[str, torch.Tensor]:
# Scaling metrics by coefficients to create the losses.
device = outputs["rgb"].device
image = batch["image"][..., :3].to(device)
image = batch["image"].to(device)
pred_image, image = self.renderer_rgb.blend_background_for_loss_computation(
pred_image=outputs["rgb"],
pred_accumulation=outputs["accumulation"],
Expand Down

0 comments on commit 5732606

Please sign in to comment.