This seems like it’s not an accurate description of what diffusion is doing. A diffusion model is not the same as compression. They’re implying that Stable Diffusion is taking the entire dataset and making it smaller then storing it. Instead, it’s just learning patterns about the art and replicating those patterns.
The “compression” they’re referring to is the latent space representation which is how Stable Diffusion avoids having to manipulate large images during computation. I mean you could call it a form of compression, but the actual training images aren’t stored using that latent space in the final model afaik. So it's not compressing every single image and storing it in the model.
This page says there were 5 billion images in the stable diffusion training dataset (albeit that may not be true as I see online it’s closer to the 2 billion mark). A Stable Diffusion model is about 5 gb. 5 gb / 5 billion is 1 byte per image. That’s impossible to fit an image in 1 byte. Obviously the claim about it storing compressed copies of the training data is not true. The size of the file comes from the weights in it, not because it’s storing “compressed copies”. In general, it seems this lawsuit is misrepresenting how Stable Diffusion works on a technical level.
If someone finds a way to reverse a hash, I'd also argue that hashing has now become a form of compression.
I think in 5 billion images there are more than enough common image areas to allow for average compression to become lower than a single byte. This is a lossy process, it does not need a complete copy of the source data, similar to how an MP3 doesn't contain most of the audio data fed into it.
I think the argument that SD revolves around lossless compression is quite an interesting one, even if the original code authors didn't realise that's what they were doing. It's the first good technical argument I've heard, at least.
All of those could've been prevented if the model was trained on public domain images instead of random people's copyrighted work. Even if this lawsuit succeeds, I don't think image generation algorithms will be banned. Some AI companies will just have spent a shitton of cash failing to get away with copyright violation, but the technology can still work for art that's either unlicensed or licensed in such a way that AI models can be trained based on it.
Stable diffusion has something called an encoder and decoder. What the encoder does is it takes an image, finds it's fundamental characteristics, and then converts it into a data point (for the sake of simplicity we will use a vector even though it doesn't have to be). Let's say the vector <0.2,0.5,0.6> represents a black dog. If you took a similar vector, you would get another picture of a dog (say a white dog). These vectors are contained in what's called a latent space which is just a collection of items where similar concepts are close together.
Stable Diffusion uses this latent space because it's more computationally efficient. So what it does is it starts with a noisy image which is converted into latent space, then it slowly gets rid of noise. It does this entire process on the latent space representation as opposed to the actual image. This means it's more computationally efficient because it doesn't have to store an entire pixel image in memory. Once it finishes getting rid of the noise, it uses the decoder to convert the image back into a pixel image. What you'll notice is that throughout this entire process it's not just retrieving a compressed image from it's training set and then using it. Instead, it's generating the image through de-noising. This de-noising process is guided by it's understanding of different concepts that can be represented in the latent space.
I think where this lawsuit goes wrong is it implies that the latent space is literally storing a copy of every image in the dataset. As far as I am aware, this is not true. Even though the latent space representations of images are dramatically smaller, it's not small enough to fit the entire dataset in a 5gb file. The only thing Stable Diffusion is storing is the algorithm itself for converting to and from latent space and that's just for computational efficiency as mentioned above. I've heard that Stable Diffusion might store some key concepts from the latent space, but I don't know if that's true or not. Either way, it seems unlikely that the entire dataset is being stored in Stable Diffusion. To me, it seems that saying Stable Diffusion is storing the images themselves is like saying GZIP's algorithm is storing the compressed version of every file in existence.
Disclaimer: Not an ML expert and this is just based on my own understanding of how it works. So I could be wrong
Many state-of-the-art compression algorithms are in fact based on generative models. But the thing is, the model weights themselves are not the compressed representation.
The trained model is the compression algorithm (or more technically, a component of it... as it needs to be combined with some kind of entropy coding).
You could use Stable Diffusion to compress and store the training data if you wanted, but nobody is doing that.
Disclaimer: Not an ML expert