Sorry, I did not understand your question correctly.
Unfortunately, I do not know why the image normalized using custom mean and std has same statistics and low MSE error when it has been reconstructed using MinMax scaler as logically, mean and std are different.
but your code can be simplified,


ToTensor scales input images in range of [0, 1], so you no longer need to




 zapnuk:

x_tensor = x_tensor / 255



The process of finding min and max of each channel than unnormalizing can be simplified to this:

min_i = x_tensor.min(dim=(1), keepdim=True).values.min(dim=(2), keepdim=True).values
max_i = x_tensor.max(dim=(1), keepdim=True).values.max(dim=(2), keepdim=True).values
x_tensor = ((x_tensor-min_i) / (max_i - min_i)) * 255
img2 = transforms.ToPILImage()(x_tensor.type(torch.uint8))

I need to do some reviewing/experiments to get what is happening and why there is no huge difference as you have mentioned.