Files
hao-ai-lab-FastVideo/tests/local_tests
William LinandClaude Opus 5.5 466b0a3268 [feat] PAN2: prompt and video guardrails, on by default
PAN 2's vLLM-Omni and Diffusers integrations check every prompt and every
generated video with the `pan2-guardrail` package's PAN2SafetyChecker, on by
default. FastVideo now does the same:

- `PAN2PromptGuardrailStage` checks the prompt right after input validation,
  before any compute. It also refuses `output_type="latent"`, which the video
  check cannot see.
- `PAN2VideoGuardrailStage` checks each decoded video after the decoding stage,
  as the uint8 `[T, H, W, 3]` frames the generator delivers.
- A blocked prompt or video raises `PAN2GuardrailViolationError`.
- `PAN2PipelineConfig.enable_guardrails` (default True) turns both checks off;
  `offload_guardrail_models` keeps the guard models on CPU between checks.
  Loading fails with install instructions when the package is missing and the
  guardrails are on.
- With sequence parallelism, only the first rank of the SP group loads the
  checker and runs the checks; it broadcasts the verdict, so every rank raises
  together and the guard models take memory on one GPU.

The parity test turns the guardrails off (random-weight checkpoint). Docs and
PORT_STATUS updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 21:42:30 +00:00
..

Local Tests

Local-only parity, smoke, component, and developer-facing behavior tests for FastVideo. They cover model ports and supporting tooling and are skipped in CI; run them locally on a single GPU (or CPU where noted).

For the CI-backed test suite, see fastvideo/tests/.

Layout

Most tests are organized by model family, one directory per port. Each family directory follows this layout:

tests/local_tests/<family>/
├── README.md         # reference assets, setup, test inventory
├── __init__.py
└── test_<family>_<component>_*.py

Families

Family Workload Dir
Flux2 T2I flux2/
GEN3C T2V gen3c/
Kandinsky-5 T2V kandinsky5/
Kandinsky-6 TI2VA (T2V/I2V + audio) kandinsky6/
Kandinsky-6 SR V2V (upscale) kandinsky6_sr/README.md
LTX-2 T2V (+ audio) ltx2/
Stable Diffusion 3.5 T2I sd35/
Stable Audio Open 1.0 T2A stable_audio/

Wan2.2 I2V record-schema checks live in the package dataset tests.

Other Suites

Suite Purpose Dir
Performance CI behavior Config, comparison policy, identity, result schema, dashboard, and worker-log capture checks performance/

Running a family

pytest tests/local_tests/<family>/ -v -s

See each family's README.md for setup (clones, weights, env vars, gated tokens) and the per-component parity coverage.

Adding a new family

Follow the model porting guide to stage the reference clone and weights, then add the family directory and its README.md in the layout above. (In-progress ports may also keep a PORT_STATUS.md; remove it once the port lands.)