flux2_pack_latents

Pack patchified FLUX.2 latents into tokens

Description

[B, C, H, W] -> [B, H * W, C] (row-major spatial flatten, channels-last). Reference: Flux2KleinPipeline._pack_latents.

Usage

flux2_pack_latents(latents)

Arguments

  • latents: Tensor [B, C, H, W].

Value

Tensor [B, H * W, C].