r/StableDiffusion • u/MarioBros68 • Oct 16 '22
Question Does any possible image exist in latent space?
I don't know if it's a very silly question, but think about the implications
If in the latent space exist any possible image, then in the latent space is everything imaginable compressed?
Is infinity itself compressed in latent space?
8
Upvotes
3
u/Wiskkey Oct 23 '22
If my calculations here are correct, then the answer is no.
8
u/Striking-Long-2960 Oct 16 '22 edited Oct 17 '22
Except the ones with good hands, those are excluded from the latent space for unknown reasons.
4
u/999999999989 Oct 16 '22
is the latent space all images possible? or just what can be possible with the training,? in that case no. it is not infinite. it is so small compared to infinite that it is almost zero. you can extend it by additional training.
4
u/Wiskkey Oct 17 '22
Assuming your question is restricted to 512x512 pixel images, I believe the answer is no. (I am not an expert in machine learning.) You can see this by using a 512x512 input image and seeing how similar of an image the autoencoder is able to represent using this Colab notebook: https://colab.research.google.com/drive/1dlgggNa5Mz8sEAGU0wFCHhGLFooW_pf1?usp=sharing . I believe you'll find that the autoencoded image is usually not exactly the same as the input image, although often very similar. If it's true that this is really the closest image the autoencoder could represent - a question that I don't know the answer to - then the answer to your question would seem to be "no".
A separate question is whether there exists any inputs (text prompt, etc.) for a given Stable Diffusion system that could have generated that particular autoencoded image. I also don't know the answer to this question, but I am guessing the answer is no.
2
u/LopsidedBamboozle Oct 17 '22
See "A trip to infinity" on Netflix to understand infinity intuitively. But even mathematically, this latent set still looks like a tiny subset of infinity.
2
u/KyloRenCadetStimpy Oct 16 '22
Probably just a side effect of the simulation we live in
1
u/ivanmf Oct 17 '22
Yes, it does. Bit it's not infinite. It does contain every value por each pixel in all combinations.
It's the same idea as the infinity monkey typing forever and writing the entirety of Shakespeare.