Replace the re-export stubs with real vendored copies of the fastvideo modeling
+ layer + supporting infra, for the kept diffusion models (wan21, wan_causal,
ltx2, flux2, matrixgame2). v2 now imports ZERO `fastvideo.*` — it is
self-contained. (bagel/qwen_omni load from vllm_omni, an external pkg, not
fastvideo; cosmos3's load_id was already dangling — both out of scope here.)
Vendored (cp + `sed fastvideo. -> v2.`):
- models/ the 5 models' nn.Module dits/vaes/encoders/audio/upsamplers + the
component loader/ + the lazy class registry (other families' rows are
dormant/lazy — only the 5 resolve).
- layers/ attention/ platforms/ distributed/ configs/ logging_utils/ hooks/
third_party/pynvml + top-level forward_context/fastvideo_args/envs/logger/
utils/version — copied verbatim (layers et al. 'as is').
- api/ slimmed to schema + results (the VideoGenerator's config dataclasses);
the fastvideo parser/presets/overrides (which pull the pipeline runtime) are
intentionally NOT vendored — v2 has its own runtime/loop.
Decoupling surgery (cut the loader's coupling to the fastvideo runtime):
- configs/pipeline_registry.py (vendored from fastvideo/registry.py, renamed to
avoid colliding with v2/registry.py): dropped the _register_presets() auto-call
and matrixgame3 (removed model); config-class resolution preserved.
- configs/pipelines/__init__.py: dropped the registry back-edge (fixes an import
cycle) — base.py imports the registry lazily where used.
- torch_backend: load_component now uses v2.models.loader.
The only remaining external 'fastvideo*' refs are `fastvideo_kernel` (the
separate optional CUDA-kernel pkg for sparse/MoBA attention) — guarded; the dense
TORCH_SDPA path v2 uses never imports it.
Vendored subtrees added to the pre-commit exclude (faithful copies, mirroring the
existing fastvideo/models exclusion — not re-linted, to stay re-syncable).
Verified: grep finds zero fastvideo-package imports in v2/; Wan2.1 T2V on H100 is
BIT-IDENTICAL to the fastvideo-backed path (same .npy SHA256, byte-for-byte); CPU
mini 156 (154 passed + 2 env-skipped on x86, torch present). Backup: branch v2_backup.
77 lines
2.3 KiB
YAML
77 lines
2.3 KiB
YAML
default_stages:
|
|
- pre-commit # Run locally
|
|
- manual # Run in CI
|
|
exclude: |
|
|
(?x)(
|
|
fastvideo/third_party/.*|
|
|
fastvideo-kernel/.*|
|
|
assets/.*|
|
|
tests/.*|
|
|
scripts/.*|
|
|
fastvideo/dataset/.*|
|
|
fastvideo/models/.*|
|
|
v2/(layers|attention|platforms|configs|distributed|models|logging_utils|third_party|hooks|api)/.*|
|
|
v2/(envs|logger|utils|version|forward_context|fastvideo_args)\.py|
|
|
^apps/dreamverse/web/.*|
|
|
examples/.*|
|
|
\.agents/.*|
|
|
.github/workflows/publish-fastvideo.yml|
|
|
.github/workflows/_template-build-image.yml
|
|
)
|
|
repos:
|
|
- repo: https://github.com/google/yapf
|
|
rev: v0.43.0
|
|
hooks:
|
|
- id: yapf
|
|
args: [--in-place, --verbose]
|
|
additional_dependencies: [toml] # TODO: Remove when yapf is upgraded
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
rev: v0.11.12
|
|
hooks:
|
|
- id: ruff
|
|
args: [--output-format, github, --fix]
|
|
- repo: https://github.com/codespell-project/codespell
|
|
rev: v2.4.1
|
|
hooks:
|
|
- id: codespell
|
|
additional_dependencies: ['tomli']
|
|
args: ['--toml', 'pyproject.toml']
|
|
# - repo: https://github.com/PyCQA/isort
|
|
# rev: 6.0.1
|
|
# hooks:
|
|
# - id: isort
|
|
- repo: https://github.com/jackdewinter/pymarkdown
|
|
rev: v0.9.30
|
|
hooks:
|
|
- id: pymarkdown
|
|
args: [fix]
|
|
- repo: https://github.com/rhysd/actionlint
|
|
rev: v1.7.7
|
|
hooks:
|
|
- id: actionlint
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
rev: v1.15.0
|
|
hooks:
|
|
- id: mypy
|
|
args: [--python-version, '3.10', --follow-imports, "skip", "--disable-error-code", "union-attr", "--disable-error-code", "override" ]
|
|
additional_dependencies: [types-aiofiles, types-cachetools, types-setuptools, types-PyYAML, types-requests]
|
|
- repo: local
|
|
hooks:
|
|
- id: check-filenames
|
|
name: Check for spaces in all filenames
|
|
entry: bash
|
|
args:
|
|
- -c
|
|
- 'git ls-files | grep -v "^\"*fastvideo/tests/ssim/" | grep -v "^\"*fastvideo/tests/inference/lora/L40S_reference_videos/" | grep " " && echo "Filenames should not contain spaces!" && exit 1 || exit 0'
|
|
language: system
|
|
always_run: true
|
|
pass_filenames: false
|
|
# Keep `suggestion` last
|
|
- id: suggestion
|
|
name: Suggestion
|
|
entry: bash -c 'echo "To bypass pre-commit hooks, add --no-verify to git commit."'
|
|
language: system
|
|
verbose: true
|
|
pass_filenames: false
|
|
# Insert new entries above the `suggestion` entry
|