Is there a more efficient transform for PNG to Tensor GreyScale than going through PIL?

I have grey-scale images in .png and i’m loading them in using ImageFolder(), and I then do the following transforms to get them as a single channel tensor,

transformations = transforms.Compose([transforms.ToTensor(),

It works, but im wondering if this is making the whole process a bit slow, perhaps there is a more efficient way of doing this?

Why do you need to transform it to a Tensor first, then back to a PILImage?
Won’t it work if you remove the two first transforms?