There are many ways to store data. What I’m using at the moment is:

png images, in order to keep a good compression/quality ratio,
encoded in a BytesIO object (you can do this by reading the PNG with PIL.Image and then saving img.save(tmp_io) where tmp_io is your BytesIO object),
written in a HDF5 database.

This means that you still have to convert to PyTorch tensors during training, but it will save you a lot of space and it’s much less costly than the whole preprocessing.
When training, just do the reverse: open the HDF5 database, decode from BytesIO to a PIL image, and then convert to tensor.