nn.PixelShuffle will change the number of output channels as described in the docs 4:

Input: (N, L, H_in, W_in) where L= C * upscale_factor**2
Output: (N, C, H_out, W_out) where H_out = H_in * upscale_factor and W_out = W_in * upscale_factor

In your case, upscale_factor=2, so the input channels are defined as L = 512 = 128 * 2**2, and the output channels thus C = 128.