Files
hao-ai-lab-FastVideo/tests
William LinandClaude Opus 5.5 b466e3cde4 [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-10-29 13:03:49 +00:00
..

Tests

  • tests/local_tests/ holds local-only parity, smoke, and component tests organized by model family (e.g. tests/local_tests/ltx2/, tests/local_tests/stable_audio/). They typically require a checked-out reference repo and/or model weights and are skipped in CI; see each family's README.md for setup. The top-level tests/local_tests/README.md is the family index.
  • The CI-backed test suite still lives in fastvideo/tests/.
  • Eventually, all tests will move under tests/.