Skip to content
/ CFG Public

PyTorch implementation of 'CFG' (Ho et al., 2022).

Notifications You must be signed in to change notification settings

KimRass/CFG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1. Theoretical Background

$$\lambda = -2\log\tan(au + b)$$ $$b = \arctan(e^{-\lambda_{\text{max}} / 2})$$ $$a = \arctan(e^{-\lambda_{\text{max}} / 2}) - b$$ $$\alpha^{2}{\lambda} = 1 / (1 + e^{-\lambda}), \sigma^{2}{\lambda} = 1 - \alpha^{2}{\lambda}$$ $$p{\theta}(z_{\lambda_{\text{min}}}) = \mathcal{N}(\mathbf{0}, \mathbf{I})$$ $$\lambda < \lambda'$$ $\lambda$가 커지는 방향이 Denoising process에 해당합니다.

1) Forward Diffusion Process

$$q(\mathbf{z}{\lambda} \vert \mathbf{x}) = \mathcal{N}(\alpha{\lambda}\mathbf{x}, \sigma^{2}{\lambda}\mathbf{I})$$ $$\mathbf{z}{\lambda} = \alpha_{\lambda}\mathbf{x} + \sigma_{\lambda}\mathbf{\epsilon}$$

2) Backward Denoising Process

$$\tilde{\mathbf{\mu}}{\lambda' \vert \lambda}(\mathbf{z}{\lambda}, \mathbf{x}) = e^{\lambda - \lambda'}(\alpha_{\lambda'}/\alpha_{\lambda})\mathbf{z}{\lambda} + (1 - e^{\lambda - \lambda'})\alpha{\lambda'}\mathbf{x}$$ $$p_{\theta}(\mathbf{z}{\lambda'} \vert z{\lambda}) = \mathcal{N}(\tilde{\mu}{\lambda' \vert \lambda}(z{\lambda}, x_{\theta}(z_{\lambda})), ()^{1 - v}()^{v})$$ $$\mathbf{x}{\theta}(\mathbf{z}{\lambda}) = (\mathbf{z}{\lambda} - \sigma{\lambda}\mathbf{\epsilon}{\theta}(\mathbf{z}{\lambda})) / \alpha_{\lambda}$$

About

PyTorch implementation of 'CFG' (Ho et al., 2022).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published