ltx23_preprocess_frames

Preprocess an image (or frame stack) for VAE encoding

Description

Mirrors the diffusers VideoProcessor: bilinear resize so the shorter relative side matches, center-crop to the exact target, and scale to [-1, 1].

Usage

ltx23_preprocess_frames(x, height, width)

Arguments

  • x: Path to a PNG/JPEG, or an array [H, W, 3] (values in [0, 1]), or a [F, H, W, 3] array of frames.
  • height,width: Integers. Target size (multiples of 32).

Value

Float32 tensor [1, 3, F, height, width] in [-1, 1].