flux_prepare_latent_image_ids

Build FLUX latent image position ids

Description

Position ids over the packed latent grid (latent height/2 x width/2). Channel 1 is always zero, channel 2 holds the row index, channel 3 the column index. Reference: FluxPipeline._prepare_latent_image_ids.

Usage

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

Arguments

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

Value

Float tensor of shape [height * width, 3].