azula.plugins.adm¶
Ablated diffusion model (ADM) plugin.
This plugin depends on the guided_diffusion module in the openai/guided-diffusion repository. To use it, clone the
repository to your machine
git clone https://github.com/openai/guided-diffusion
and add it to your Python path before importing the plugin.
import sys; sys.path.append("path/to/guided-diffusion")
...
from azula.plugins import adm
References
Diffusion Models Beat GANs on Image Synthesis (Dhariwal et al., 2021)
Classes¶
Creates a named beta schedule. |
|
Creates an improved DDPM denoiser. |
Functions¶
Returns the list of available pre-trained models. |
|
Loads a pre-trained ADM denoiser. |
Descriptions¶
- class azula.plugins.adm.BetaSchedule(name='linear', steps=1000)¶
Creates a named beta schedule.
- class azula.plugins.adm.ImprovedDenoiser(backbone, schedule)¶
Creates an improved DDPM denoiser.
References
Improved Denoising Diffusion Probabilistic Models (Nichol et al., 2021)
- azula.plugins.adm.list_models()¶
Returns the list of available pre-trained models.
- azula.plugins.adm.load_model(key, **kwargs)¶
Loads a pre-trained ADM denoiser.
- Parameters:
key (str) – The pre-trained model key.
kwargs – Keyword arguments passed to
torch.load.
- Returns:
A pre-trained denoiser.
- Return type: