Skip to content

Commit 7c7b859

Browse files
fix alpha compositing.
1 parent 9849f64 commit 7c7b859

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nerfstudio/models/splatfacto.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ def composite_with_background(self, image, background) -> torch.Tensor:
638638
background: the background color
639639
"""
640640
if image.shape[-1] == 4:
641-
alpha = image[..., -1].unsqueeze(-1).repeat((1, 1, 3))
641+
alpha = image[..., -1].unsqueeze(-1).repeat((1, 1, 1, 3))
642642
return alpha * image[..., :3] + (1 - alpha) * background
643643
else:
644644
return image

0 commit comments

Comments
 (0)