This is the code for calculating 'next step' in null_text_w_ptp.ipynb, but I think it's different from the equation in your paper.
According to your paper, next step can be calculated as:
$$z{t+1}=\sqrt{{\alpha{t+1}}\over \alpha_t}zt + \left(\sqrt{{1 \over {\alpha{t+1}}} - 1} - \sqrt{{1 \over \alphat} - 1}\right)\cdot \epsilon\theta (z_t, t, C)$$
Latent is calculated at timestep $t$, and this code calculates latent from timestep $t-20$ to timestep $t$, so this code performs the same as using $\epsilon_\theta (zt, t+20, C))$ instead of $\epsilon\theta (z_t, t, C))$.
This is the code for calculating 'next step' in null_text_w_ptp.ipynb, but I think it's different from the equation in your paper.
According to your paper, next step can be calculated as: $$z{t+1}=\sqrt{{\alpha{t+1}}\over \alpha_t}zt + \left(\sqrt{{1 \over {\alpha{t+1}}} - 1} - \sqrt{{1 \over \alphat} - 1}\right)\cdot \epsilon\theta (z_t, t, C)$$
Latent is calculated at timestep $t$, and this code calculates latent from timestep $t-20$ to timestep $t$, so this code performs the same as using $\epsilon_\theta (zt, t+20, C))$ instead of $\epsilon\theta (z_t, t, C))$.