torchvision.utils.save_image uses PIL.Image.save to save the image in these lines of code 1. Based on this it seems you can pass a format argument, which should be one of the supported PIL formats as seen here 3.