sa_audio ¶
Lazy-loading pipeline wrapper around OobleckVAE.
Two reasons this exists rather than using OobleckVAE directly:
1. The underlying VAE is fetched on first encode/decode call, not at construction — lets pipelines build the module tree on CPU before knowing the target device. 2. The lazy VAE's params are hidden from named_parameters() so the FastVideo pipeline-component loader doesn't try to match Oobleck's safetensors against the host pipeline's converted-repo state dict.
For standalone use prefer OobleckVAE.from_pretrained(...) directly.
Classes¶
fastvideo.models.vaes.sa_audio.SAAudioVAEModel ¶
SAAudioVAEModel(config: OobleckVAEConfig)
Bases: Module
Pipeline-glue lazy loader around OobleckVAE.
Source code in fastvideo/models/vaes/sa_audio.py
Methods:¶
fastvideo.models.vaes.sa_audio.SAAudioVAEModel.decode ¶
Decode an audio latent ([B, C_latent, L]) -> waveform ([B, audio_channels, samples]).
Source code in fastvideo/models/vaes/sa_audio.py
fastvideo.models.vaes.sa_audio.SAAudioVAEModel.encode ¶
encode(waveform: Tensor, sample_posterior: bool = False) -> Tensor
Encode [B, C_audio, samples] -> latent [B, C_latent, L].
sample_posterior=False (default): deterministic mean. sample_posterior=True: stochastic sample (mean + softplus(scale) * randn).