flux2_prepare_latent_ids

Build FLUX.2 latent position ids

Description

Columns (T, H, W, L) with H and W carrying the packed-grid position (row-major: H varies slowest), T = L = 0. Reference: Flux2KleinPipeline._prepare_latent_ids.

Usage

flux2_prepare_latent_ids(height, width, device = "cpu")

Arguments

  • height: Integer. Packed grid height (pixel height / 16).
  • width: Integer. Packed grid width (pixel width / 16).
  • device: Device for the resulting tensor.

Value

Float tensor [height * width, 4].