Stable Diffusion, Image Compression, Machine Learning, Artificial Intelligence, Deep Learning.
This for example preserves camera grain (qualitatively) as well as any other qualitative degradation, whereas an AI restoration of a heavily compressed jpg would not be able to restore that camera grain because any information about it has been lost from the data. To give an analogy for this