flux_unpack_latents

Unpack a FLUX patch sequence back into latents

Description

Inverse of flux_pack_latents. Height and width are the target image dimensions in pixels; the latent grid is derived via the VAE scale factor and the 2x2 patch size. Reference: FluxPipeline._unpack_latents.

Usage

flux_unpack_latents(latents, height, width, vae_scale_factor = 8L)

Arguments

  • latents: Tensor of shape [B, S, C_packed].
  • vae_scale_factor: Integer. Spatial downsampling of the VAE (8).
  • height,width: Integers. Image height/width in pixels.

Value

Tensor of shape [B, C_packed / 4, height / 8, width / 8].