DDIM公式草稿3

q(xtx0)q(xt1x0)使q(xtxt1),q(xt1xt,x0){xt1=mtxt+ntx0+σtε1xt=αtx0+1αtε2xt1=αt1x0+1αt1ε3xt1=mt(αtx0+1αtε2)+ntx0+σtε1=(mtαt+nt)x0+mt1αtε2+σtε1{mtαt+nt=αt1mt2(1αt)+σt2=1αt1mt=1αt1σt21αtnt=αt1αt1αt(1αt1σt2)xt1=1αt1σt21αtxt+(αt1αt1αt(1αt1σt2))x0+σtε1=αt1x0+1αt1σt2(11αtxtαt1αtx0)+σtε1xt1=αt1x0+1αt1σt2xtαtx01αt+σtε1x0=x0t^xtαtx01αt=εθ(xt,t)ifσt=σDDPMDDIMDDPM已知q(x_t|x_0) \quad q(x_{t-1}|x_0) \quad 不使用q(x_t|x_{t-1}),求q(x_{t-1}|x_t,x_0) \\ \\ \begin{cases} x_{t-1}=m_tx_t+n_tx_0+\sigma_t\varepsilon_1 \\ x_{t}=\sqrt{\overline{\alpha_t}}x_0+\sqrt{1-\overline{\alpha_t}}\varepsilon_2 \\ x_{t-1}=\sqrt{\overline{\alpha_{t-1}}}x_0+\sqrt{1-\overline{\alpha_{t-1}}}\varepsilon_3 \\ \end{cases} \\ \quad \\ \begin{aligned} x_{t-1}&=m_t(\sqrt{\overline{\alpha_t}}x_0+\sqrt{1-\overline{\alpha_t}}\varepsilon_2)+n_tx_0+\sigma_t\varepsilon_1\\ &=(m_t\sqrt{\overline{\alpha_t}}+n_t)x_0+m_t\sqrt{1-\overline{\alpha_t}}\varepsilon_2+\sigma_t\varepsilon_1 \\ \quad \\ &\begin{cases} m_t\sqrt{\overline{\alpha_t}}+n_t=\sqrt{\overline{\alpha_{t-1}}} \\ m_t^2(1-\overline{\alpha_t})+\sigma_t^2=1-\overline{\alpha_{t-1}} \end{cases} \\ 解得:&m_t=\sqrt{\frac{1-\overline{\alpha_{t-1}}-\sigma_t^2}{1-\overline{\alpha_t}}} \qquad n_t=\sqrt{\overline{\alpha_{t-1}}}-\sqrt{\frac{\overline{\alpha_t}}{1-\overline{\alpha_t}}(1-\overline{\alpha_{t-1}}-\sigma_t^2)} \\ \quad \\ x_{t-1}&=\sqrt{\frac{1-\overline{\alpha_{t-1}}-\sigma_t^2}{1-\overline{\alpha_t}}} x_t+(\sqrt{\overline{\alpha_{t-1}}}-\sqrt{\frac{\overline{\alpha_t}}{1-\overline{\alpha_t}}(1-\overline{\alpha_{t-1}}-\sigma_t^2)})x_0+\sigma_t\varepsilon_1 \\ &=\sqrt{\overline{\alpha_{t-1}}}x_0+\sqrt{{1-\overline{\alpha_{t-1}}-\sigma_t^2}}(\frac{1}{\sqrt{{1-\overline{\alpha_{t}}}}}x_t-\frac{\sqrt{{\overline{\alpha_{t}}}}}{\sqrt{{1-\overline{\alpha_{t}}}}}x_0)+\sigma_t\varepsilon_1 \\ x_{t-1}&=\sqrt{\overline{\alpha_{t-1}}}x_0+\sqrt{{1-\overline{\alpha_{t-1}}-\sigma_t^2}} \quad \frac{x_t-\sqrt{{\overline{\alpha_{t}}}}x_0}{\sqrt{{1-\overline{\alpha_{t}}}}}+\sigma_t\varepsilon_1 \\ &\qquad \qquad \textcolor{red}{x_0=\hat{x_{0|t}} \qquad \frac{x_t-\sqrt{{\overline{\alpha_{t}}}}x_0}{\sqrt{{1-\overline{\alpha_{t}}}}} =\varepsilon_{\theta}(x_t,t)} \\ \quad \\ if& \quad \sigma_t=\sigma_{DDPM} \qquad DDIM \rightarrow DDPM \end{aligned}
全部评论

相关推荐

10-24 13:36
门头沟学院 Java
Zzzzoooo:更新:今天下午有hr联系我去不去客户端,拒了
点赞 评论 收藏
分享
点赞 收藏 评论
分享
牛客网
牛客企业服务