That said it can sometimes be in violation of copyright if it creates a specific image that is “too close to another original” (just like a human would be in violation even if they never previously saw that image).
But the above is just my intuition (and possibly yours) that doesn’t mean a lawyer couldn’t make the argument that it’s a ”good enough lossy compression - just like jpeg but smaller” and therefore “contains the images in just 2 bytes”.
That lawyer may fail to win the argument, but there is a chance that they do win the argument! Especially as researchers keep making Diffusion and SD models better and better at being compression algos (which is a topic people are actively working on).