oobleck ¶
Stable Audio Open 1.0 "Oobleck" VAE.
5-stage Conv1d autoencoder with Snake activations + diagonal-Gaussian bottleneck. Loads stabilityai/stable-audio-open-1.0/vae/ weights directly via OobleckVAE.from_pretrained(...).
vae = OobleckVAE.from_pretrained("stabilityai/stable-audio-open-1.0", subfolder="vae")
waveform = vae.decode(latent) # (B, audio_channels, samples)
latent = vae.encode(waveform).sample() # or .mode()
Classes¶
fastvideo.models.vaes.oobleck.OobleckDiagonalGaussianDistribution ¶
OobleckDiagonalGaussianDistribution(parameters: Tensor, deterministic: bool = False)
Diagonal-Gaussian VAE posterior with softplus(scale) + 1e-4 std.
Source code in fastvideo/models/vaes/oobleck.py
fastvideo.models.vaes.oobleck.OobleckVAE ¶
OobleckVAE(config=None, *, encoder_hidden_size: int = 128, downsampling_ratios: list[int] | None = None, channel_multiples: list[int] | None = None, decoder_channels: int = 128, decoder_input_channels: int = 64, audio_channels: int = 2, sampling_rate: int = 44100)
Bases: Module
Stable Audio Open 1.0 VAE.
Constructed either from an OobleckVAEConfig (the standard VAELoader path) or from explicit kwargs (back-compat for tests and from_pretrained callers).
Source code in fastvideo/models/vaes/oobleck.py
Methods:¶
fastvideo.models.vaes.oobleck.OobleckVAE.from_pretrained classmethod ¶
from_pretrained(model_path: str, *, subfolder: str | None = None, torch_dtype: dtype | None = None) -> 'OobleckVAE'
Instantiate and load weights from a Stable Audio VAE dir.
model_path may be: * a HF repo id (e.g. stabilityai/stable-audio-open-1.0), * a local directory containing config.json + safetensors, * a local directory whose subfolder="vae" holds those files.
For gated repos, the HF token is read from HF_TOKEN / HUGGINGFACE_HUB_TOKEN / HF_API_KEY (see resolve_hf_token).
Source code in fastvideo/models/vaes/oobleck.py
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 | |
fastvideo.models.vaes.oobleck.Snake1d ¶
Bases: Module
A 1D Snake activation with learnable per-channel alpha/beta.