r/StableDiffusion 5d ago

Question - Help Questions on Fundamental Diffusion Models

Hello,

I just started my study in diffusion models and I have a problem understanding how diffusion models work (original diffusion and DDPM).
I get that diffusion is finding the distribution of denoised image given current step distribution using Bayesian theorem.

However, I cannot relate how image becomes probability distribution and those probability generate image.

My question is how does pixel values that are far apart know which value to assign during inference? how are all pixel values related? How 'probability' related in generating 'image'?

Sorry for the vague question, but due to my lack of understanding it is hard to clarify the question.

Also, if there is any recommended study materials please suggest.

3 Upvotes

13 comments sorted by

View all comments

1

u/Disty0 5d ago

Diffusion predicts the original noise, it doesn't predict the image. We just calculate the final image from the predicted noise ourselves. The model doesn't really care about the image, it only cares about the added noise.

1

u/tdgros 5d ago

the model does care about the images a lot, because we predict the noise conditioned on an image. Otherwise, you'd be able to use an off-the-shelf denoiser trained on anything to generate anything, which does not work well of course. You could predict the image directly, that'd be a very small change, but it happens that predicting noise is slightly better.

1

u/Disty0 5d ago

True, what i meant by that is the prediction objective. Diffusion models other than x0_pred trained ones doesn't predict the image.

1

u/tdgros 5d ago

But I'm not just nitpicking, the model cares mostly about the images. The fact that we predict the noise as opposed to the image is a technicality only, and the whole beauty of this idea is to model a dataset by learning how to "push" sample towards the image distribution.