Files
hao-ai-lab-FastVideo/docs
SolitaryThinker 26719dcfe7 [new-model] Add PAN2 text-to-video and image-to-video
Port of vllm-project/vllm-omni#8602. PAN2 is a 29B mixture-of-transformers
video DiT (separate video and text streams joined in one attention per
block) with a Qwen3.5 text encoder and the Wan2.2 VAE. One pipeline serves
text-to-video and first-frame image-to-video.

- Native PAN2 DiT; per-stream Q/K/V fused at load time, Ulysses SP with
  replicated text tokens through DistributedAttention.
- Native Qwen3.5 text encoder (Gated DeltaNet + gated attention) with a
  PyTorch chunked delta rule.
- Reuses the Wan2.2 VAE and the flow-match Euler scheduler.
- PAN2 stages: chat-template prompt crop at hidden_states[-3], first-frame
  conditioning, uniform sigmas with shift 7, fp32 latents. Adds a
  DenoisingStage.prepare_scheduler_model_output hook for the last one.
- Registry entry for the Modular Diffusers PAN2ModularPipeline manifest,
  pan2_t2v / pan2_i2v presets, example, docs, and local parity tests
  against a diffusers/transformers reference on the public tiny checkpoint.
2026-10-15 03:44:35 +00:00
..
2026-07-19 18:37:47 -07:00

FastVideo Documentation

This directory contains the FastVideo documentation built with MkDocs.

Build the docs locally

# Install docs dependencies
uv pip install -r requirements-mkdocs.txt
npm ci --prefix docs

# Build the browser API/validator bundle and generate cookbook catalogs
npm run build:catalog --prefix docs

# Serve docs with live reload (recommended for development)
mkdocs serve

# Or build static site
mkdocs build

Run these commands from the repository root with Node 22.13+ (22.x) or Node 24+. Catalog generation uses authored YAML and Node dependencies; it does not import FastVideo or install model runtime dependencies. mkdocs build and mkdocs serve use the generated files without regenerating them. A small MkDocs hook checks required assets before and after the build and explains how to prepare them if missing. Rerun build:catalog after changing cookbook sources. The npm prebuild:catalog and pretest:cookbook hooks automatically run build:assets, including in CI. The combined docs/assets/cookbook-config/cookbook-config.js, its cookbook-config.LICENSE.txt, index and catalogs are Git-ignored and published together; do not hand-edit or commit them. Handwritten modules live in docs/js/ and tests in docs/tests/.

View the docs

Development server (with live reload)

mkdocs serve

Then open your browser to: http://127.0.0.1:8000

Static build

mkdocs build
python -m http.server -d site/

Then open your browser to: http://localhost:8000

Automatic Deployment

Documentation is automatically built and deployed to GitHub Pages when relevant changes are pushed to the main branch via .github/workflows/infra-docs.yml. Pull requests run the build without deploying. The normal docs job installs requirements-mkdocs.txt and the Node dependencies with npm ci --prefix docs, runs scoped lint/format checks, cookbook tests and asset-check tests, generates catalogs with npm run build:catalog --prefix docs, and runs mkdocs build. Invalid authored metadata stops the build. The generated JSON remains Git-ignored but is copied to site/assets/cookbook-config/ for publication. The source-only docs/cookbook/options.yaml and recipe manifests are excluded from the site. No separate metadata job or runtime server is required.

Update documentation dependencies

Edit requirements-mkdocs.in, then regenerate the pinned Linux/Python 3.12 lock file:

uv pip compile requirements-mkdocs.in \
  -o requirements-mkdocs.txt \
  --python-platform x86_64-manylinux_2_28 \
  --python-version 3.12

Local cookbook catalogs

Generate catalogs from the repository root:

npm ci --prefix docs
npm run build:catalog --prefix docs

This command builds the combined API/validator bundle first. Rerun it whenever shared options, recipe manifests or baseline YAML change. Then mkdocs build or mkdocs serve includes the generated assets. Generation loads no model weights and performs no inference.

Inspect a deployment without a browser UI:

node docs/js/build-cookbook-config.mjs --preview fastwan21/cuda-rest

See the contributor guide for recipe authoring and local test commands, and the API contract for using the same catalogs from a cookbook UI.

Check cookbook changes

npm run test:cookbook --prefix docs
npm run check:cookbook --prefix docs
python -m unittest discover -s docs/tests -p 'test_*.py'

npm run format:cookbook --prefix docs formats handwritten cookbook modules, build scripts, tooling configuration and Node tests under docs/. The check commands do not change files. The Node tests use synthetic fixtures for reusable behavior and discover every production recipe for integration checks. They do not launch serving processes.