- Core Python package:
fastvideo/(models, pipelines, training, distributed runtime, CLI entrypoints). - CUDA/custom kernels:
fastvideo-kernel/(separate build/test flow). - Tests:
fastvideo/tests/for package-level tests (dataset, encoders, inference, training, SSIM, workflow).tests/local_tests/for additional local/component checks.
- Docs and guides:
docs/(MkDocs source), with contributor docs indocs/contributing/. - Runnable examples and scripts:
examples/andscripts/. - Static assets:
assets/(includingassets/images/,assets/videos/, andassets/prompts/) andcomfyui/assets/.
uv pip install -e .[dev]: editable install with lint/test extras.pre-commit install --hook-type pre-commit --hook-type commit-msg: enable local hooks.pre-commit run --all-files: run formatter/lint/type/spelling checks.pytest tests/: run top-level test suite.pytest fastvideo/tests/ -v: run package tests.pytest fastvideo/tests/ssim/ -vs: run SSIM regression tests (GPU-heavy).cd fastvideo-kernel && ./build.sh: build kernel extensions.
- Python 3.10+; 4-space indentation; keep code and imports readable and explicit.
- Style tools are configured in
pyproject.tomland.pre-commit-config.yaml:yapf(format),ruff(lint, auto-fix),mypy(typing),codespell.
- Target line length is 80.
- Naming:
snake_casefor functions/files,PascalCasefor classes,UPPER_SNAKE_CASEfor constants.
- Use
pytestand place tests near relevant domains (e.g.,fastvideo/tests/encoders/). - Prefer descriptive names like
test_<feature>_<expected_behavior>.py. - For new pipelines/backends, include at least one regression-oriented test; add SSIM coverage when output quality must be preserved.
- Document GPU assumptions in tests that require specific hardware.
- Follow existing commit style: short subject with optional tag prefix, e.g.
[bugfix]: ...,[feat]: ...,[misc]: ..., and include PR reference like(#1234)when applicable. - Keep commits focused by concern (feature, refactor, fix).
- PRs should include:
- clear problem/solution summary,
- test evidence (
pytest/SSIM outputs or rationale if skipped), - linked issue/PR context,
- screenshots or sample outputs for UI/demo/docs changes.
This repository is agent-friendly. Before doing any work, read:
.agents/onboarding/README.md— full onboarding guide with step-by-step instructions..agents/memory/codebase-map/README.md— structural index of the entire repository..agents/skills/— available agent skills (check if one exists before writing code)..agents/workflows/— SOPs for common procedures (experiment lifecycle, evaluation, etc.)..agents/lessons/— known pitfalls and their documented fixes.
If you are exploring a new procedure that has no existing SOP, document your
progress in .agents/exploration/ and flag it for review at the end of your
session.