Thanks for the code!
I’ve debugged it and it seems PIL is unable to properly create an image out of the np array.
In fact Image.from_array(j, mode="RGB") creates the same interleaved output.
You could fix it via:
images_data=[]
for j in padded:
    j = j * 255.
    j = j.astype(np.uint8)
    image_new = transforms.functional.to_pil_image(j, mode="RGB")
    images_data.append(image_new)

I’m not sure, why the transformation fails using, but maybe it’s expected for float64.
CC @fmassa who might know more about it.