nemo_automodel.components.models.bagel.autoencoder
nemo_automodel.components.models.bagel.autoencoder
Autoencoder used by BAGEL Stage 2 image generation training.
Module Contents
Classes
Functions
Data
API
Bases: Module
Single-head spatial attention block used in the VAE bottleneck.
Apply scaled dot-product attention over flattened image positions.
Apply residual attention.
Bases: Module
BAGEL Stage 2 autoencoder wrapper.
Decode scaled latents to image tensors.
Encode image tensors to scaled latents.
Encode and decode image tensors.
Architecture parameters for the BAGEL/FLUX autoencoder.
Bases: Module
BAGEL/FLUX autoencoder decoder.
Decode latents to image tensors.
Bases: Module
Convert latent moments to a Gaussian sample or mean.
Sample from or return the mean of a diagonal Gaussian.
Bases: Module
Stride-2 downsample with explicit asymmetric padding.
Downsample spatial dimensions by 2.
Bases: Module
BAGEL/FLUX autoencoder encoder.
Encode an image tensor to Gaussian latent moments.
Bases: Module
Residual convolution block used by the autoencoder.
Run the residual block.
Bases: Module
Nearest-neighbor upsample followed by a 3x3 convolution.
Upsample spatial dimensions by 2.
Return the BAGEL-7B-MoT autoencoder architecture parameters.
Load the BAGEL autoencoder from ae.safetensors.
Parameters:
Local path to ae.safetensors. If None, the module is
returned with randomly initialized weights.
Returns: tuple[AutoEncoder, AutoEncoderParams]
The autoencoder module and its architecture parameters.
Swish activation.