by benlivengood · 3y ago · 0 comments
Stable Diffusion's U-Net is trained to remove noise from images in latent space, which the variational autoencoder (VAE) converts to and from pixel space. CLIP embeddings are used to improve the denoising step of the U-Net by using the correlations between human language descriptions of the pixel image to reduce latent noise. Neither the U-Net nor the VAR are trained to interpolate or reproduce images from the training set; if that happened the model would be overfitted and loss would be terrible on the validation set. The VAE is trained to produce a latent space that can accurately encode and decode any pixel image, and the U-Net is trained to remove gaussian noise from the latent space.
Stable Diffusion v2 16-bit is ~3GB of data. It was trained on hundreds of millions of images (minimum of 170M in the 512x512 step alone). That leaves a maximum of ~20 bytes per image that could conceivably be a copy, which is certainly not enough to directly reproduce either the style or contents of any individual image.
There is no artwork included in Stable Diffusion. There is a semantic representation of how images are composed of varied subjects represented in the latent space and what pixel probabilities over those subjects relate to human language phrases during decoding, and finally a method to remove noise from the semantic representation, e.g. starting with a blank or random canvas and interpreting what may be there, iteratively guided by CLIP embeddings. If you give Stable Diffusion an empty CLIP embedding you get a random human-interpretable image obeying the distribution of the learned latent space.
You might as well say that there's no artwork included in a .jpg, just data that can be used to recreate a piece of artwork using a carefully crafted interpreter.
It is not a copyright infringement I go to Disney's website, download a JPEG, convert that JPEG to 1s and 0s, print just a bunch of 1s and 0s and not the image and not ascii art of the image, just like a printing press made up of just [1] and [0] character blocks, and sell that. Yes, the 1s and 0s are mathematically derived from the image but the image of 1s and 0s is not a visual derivative of the Disney image. That is, no one is going to buy a t-shirt of 1s and 0s instead of a Mickey t-shirt. Anyone can go to the Disney website and get those same 1s and 0s.
Again, anyone can go to the Disney website and get those same 1s and 0s, so this is not at all about access. This is about putting things on t-shirts and selling them.
Only because of applied license.
> convert that JPEG to 1s and 0s, print just a bunch of 1s and 0s
Yes, there is, barring context that maked it fair use (which is an exception that applies to things that would otherwise be violations), this is a fixed exact copy in an alternative form jist as much as a .zip or a lossless .png converted from the .jpg would be, and violates exclusive rights in copyright.
> Anyone can go to the Disney website and get those same 1s and 0s.
That’s an argument against damages, not against it being unauthorized copying.
Aaargh. Implied.
Latents are a compressed representation of the source images that are fully recoverable.
If you train a model on a compressed jpg of an image, or on any deterministic transformation of it, you’re still training it on that image.
Any suggestion otherwise is only because someone is trying to put some spin on things.
> Stable Diffusion v2 16-bit is ~3GB of data. It was trained on hundreds of millions of images…
And yet! Remarkably! It can generate pictures of the Mona Lisa!
Here’s a question for you: if you encode the process of drawing an exact copy of an image, does the pure code that implements that mean you have a copy of the image in it?
Have you encoded pixels as code?
Does that mean there’s no copy of the image?
How about a zip file full of images? It’s just a high entropy binary blob right? Yet… remarkably!!! It can be transformed into images by applying an algorithm.
I don’t know the answer, but this handwavy “it couldn’t possibly encode them it’s too small” is…
Pure. Nonsense.
Of course some part of some images is embedded in the model in some form.
Stop trivialising the issue.
The issue here is: Does an algorithm that generates content infringe copyright?
Does a black box that takes the input “a picture of xxx” and a seed and outputs a copyrighted image infringe?
You know that’s possible. Don’t dodge. Technical details about oh “it couldn’t possibly have…” are pure rubbish.
Sure it could. It could have a full resolution copy of a photo of the image in that black box.
Of all the training data? Probably not. But of some of it? In compressed latent form? Most definitely.
"Image diffusion models such as DALL-E 2, Imagen, and Stable Diffusion have attracted significant attention due to their ability to generate high-quality synthetic images. In this work, we show that diffusion models memorize individual images from their training data and emit them at generation time. With a generate-and-filter pipeline, we extract over a thousand training examples from state-of-the-art models, ranging from photographs of individual people to trademarked company logos. We also train hundreds of diffusion models in various settings to analyze how different modeling and data decisions affect privacy. Overall, our results show that diffusion models are much less private than prior generative models such as GANs, and that mitigating these vulnerabilities may require new advances in privacy-preserving training. "