Skip to content

Commit

Permalink
Fix mask check in PatchPixelSampler (#1971)
Browse files Browse the repository at this point in the history
* fix mask check in PatchPixelSampler

* change torch.Tensor to Tensor
  • Loading branch information
lukasHoel committed May 22, 2023
1 parent 27e2c87 commit d8f2446
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nerfstudio/data/pixel_samplers.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def sample_method(
mask: Optional[Tensor] = None,
device: Union[torch.device, str] = "cpu",
) -> Int[Tensor, "batch_size 3"]:
if mask:
if isinstance(mask, Tensor):
# Note: if there is a mask, sampling reduces back to uniform sampling
indices = super().sample_method(batch_size, num_images, image_height, image_width, mask=mask, device=device)
else:
Expand Down

0 comments on commit d8f2446

Please sign in to comment.