alexzhou907 / DDBM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

logsnr function

chjchjchjchjchj opened this issue · comments

Hi @alexzhou907 , It is a really nice work!
I've been going through the code in Line91 of karras_diffusion.py and Line93 of karras_diffusion.py of the same file, and I've got a question regarding the parameter 't' in the functions vp_logsnr and vp_logs. It seems to consistently have a value of 1. Could you kindly clarify why this value is chosen for 't'?

def vp_logsnr(t, beta_d, beta_min):
    t = th.as_tensor(t)
    return - th.log((0.5 * beta_d * (t ** 2) + beta_min * t).exp() - 1)
    
def vp_logs(t, beta_d, beta_min):
    t = th.as_tensor(t)
    return -0.25 * t ** 2 * (beta_d) - 0.5 * t * beta_min

Hi! These are to get the SNR for T, which is 1 for all my experiments. These constants are needed to rescale the input, output, etc. just as in EDM. Please refer to the paper for details.

Thanks