Files
hao-ai-lab-FastVideo/scripts
5622863d75 test(ltx2-sr): add numerical alignment harness — public vs internal
Single script with three modes:

* --label internal --output /tmp/ltx2_sr_internal.pt  : runs the legacy
  from_pretrained kwargs path and saves frames + metadata. Used against
  PYTHONPATH=../FastVideo-internal as the reference run.
* --label public --use-typed-api --output /tmp/ltx2_sr_public.pt : runs
  through the new GeneratorConfig + GenerationRequest typed API with
  pipeline.preset_overrides["refine"] driving the SR path. Used against
  PYTHONPATH=../FastVideo (the public package) for the candidate run.
* --diff --reference R --candidate C : loads both .pt files and reports
  shape parity + max_abs / mean_abs / rms / psnr / pixel-bucket
  histograms over the uint8 frames.

Pinned alignment fixture: PROMPT + seed + 1088x1920x121x24fps + 8 base
steps + 3 refine steps mirrors basic_ltx2_upscale.py upstream so we
exercise the same code path the user has been generating with.
Deliberately skips FP4 (no quant config) and Dreamverse runtime knobs
to keep the bf16 path clean per request.

The two runs are intentionally invoked in separate processes via
PYTHONPATH overrides because both repos register as the `fastvideo`
package and can't be imported together. The diff script then runs in
either env to load both .pt files and compute the alignment metrics.

Co-authored-by: Junda (David) Su <90978028+Davids048@users.noreply.github.com>
Co-authored-by: Matthew Noto <99706358+RandNMR73@users.noreply.github.com>
Co-authored-by: XOR-op <17672363+XOR-op@users.noreply.github.com>
Co-authored-by: Zhang Peiyuan <42993249+jzhang38@users.noreply.github.com>
2026-05-05 03:05:53 -07:00
..
2026-02-19 14:23:32 -08:00