improved-diffusion
improved-diffusion copied to clipboard
The meaning of the scaling factor 0.5 in sampling from p(xt-1|xt)
I noticed a scaling factor of 0.5 when sampling from p(xt-1|xt). I tried to find the definition of this 0.5 on the paper but failed. Is there any special factor behind this 0.5? would the performance be different without this factor?
https://github.com/openai/improved-diffusion/blob/783b6740edb79fdb7d063250db2c51cc9545dcd1/improved_diffusion/gaussian_diffusion.py#L386
@zihaozou Looks to be an optimisation since:
log(x^0.5) = 0.5 * log(x)
where x is the variance. So, taking the square root (i.e., x^0.5) gives us standard deviation.
th.exp(0.5 * out["log_variance"]) is Standard deviation