azula.plugins.eldm¶
Elucidated latent diffusion model (ELDM or EDM2) plugin.
This plugin depends on the torch_utils and training modules in the NVlabs/edm2 repository. To use it, clone the repository to your
machine
git clone https://github.com/NVlabs/edm2
and add it to your Python path before importing the plugin.
import sys; sys.path.append("path/to/edm2")
...
from azula.plugins import eldm
You may also need to install additional dependencies in your environment, including
diffusers and accelerate.
pip install diffusers accelerate
References
Classes¶
Creates an auto-encoder wrapper. |
|
Creates an elucidated latent denoiser. |
Functions¶
Loads a pre-trained ELDM (or EDM2) latent denoiser. |
Descriptions¶
- class azula.plugins.eldm.AutoEncoder(vae, shift, scale)¶
Creates an auto-encoder wrapper.
- encode(x)¶
Encodes images to latents.
- class azula.plugins.eldm.ElucidatedLatentDenoiser(backbone, schedule=None)¶
Creates an elucidated latent denoiser.
- Parameters:
backbone (Module) – A noise conditional network.
schedule (Schedule) – A noise schedule. If
None, useazula.plugins.edm.ElucidatedScheduleinstead.
- forward(z_t, t, label=None, **kwargs)¶
- Parameters:
- Returns:
The Gaussian \(\mathcal{N}(Z \mid \mu_\phi(z_t \mid c), \Sigma_\phi(z_t \mid c))\).
- Return type: