Converting from “tensor” images in [0,1] to unsigned bytes “PIL” images is a fairly standard transformation (e.g., just multiply by 255 and cast) as in to_pil_image:
torchvision.transforms.functional — Torchvision main documentation.
Alternatively, if you wanted a “discrete” output, you could frame it as a 255-class classification problem per pixel.