Solved by ProGamerGov in post #2 
              
              
                Only applying the mask to the overlapping part of the tensors seems to work: 
overlap = 540
lin_mask_part_1 = torch.linspace(0,1,overlap).repeat(1080,1).repeat(3,1,1).unsqueeze(0)
lin_mask_part_2 = torch.linspace(1,0,overlap).repeat(1080,1).repeat(3,1,1).unsqueeze(0)

test_tensor_1[:,:,:,overlap:] =…