load_flux2_vae_decoder

Load the FLUX.2 VAE decoder from safetensors

Description

Loads the decoder half plus post_quant_conv and the BatchNorm running statistics; encoder and quant_conv keys are skipped (txt2img needs no encoder).

Usage

load_flux2_vae_decoder(path, latent_channels = 32L,
                       block_channels = c(512L, 512L, 256L, 128L),
                       norm_groups = 32L, verbose = TRUE)

Arguments

  • path: Path to the VAE .safetensors file (or a directory containing diffusion_pytorch_model.safetensors).
  • verbose: Logical.
  • latent_channels,block_channels,norm_groups: Constructor arguments for flux2_vae_decoder.

Value

The loaded flux2_vae_decoder in eval mode.