FastVideo is an inference and post-training framework for diffusion models. It features an end-to-end unified pipeline for accelerating diffusion models, starting from data preprocessing to model training, finetuning, distillation, and inference. FastVideo is designed to be modular and extensible, allowing users to easily add new optimizations and techniques. Whether it is training-free optimizations or post-training optimizations, FastVideo has you covered.
-
+
## Key Features
@@ -42,91 +36,16 @@ FastVideo has the following features:
## Documentation
-% How to start using FastVideo?
+Welcome to FastVideo! This documentation will help you get started with our unified inference and post-training framework for accelerated video generation.
-:::{toctree}
-:caption: Getting Started
-:maxdepth: 1
+Use the navigation menu on the left to explore different sections:
-getting_started/installation
-
-:::
-
-:::{toctree}
-:caption: Inference
-:maxdepth: 1
-
-inference/inference_quick_start
-inference/examples/examples_inference_index
-inference/configuration
-inference/optimizations
-inference/comfyui
-inference/support_matrix
-inference/cli
-inference/add_pipeline
-:::
-
-:::{toctree}
-:caption: Training
-:maxdepth: 1
-
-training/examples/examples_training_index
-training/data_preprocess
-
-:::
-
-:::{toctree}
-:caption: Distillation
-:maxdepth: 1
-
-distillation/examples/examples_distillation_index
-distillation/data_preprocess
-distillation/dmd
-:::
-
-% What is STA Kernel?
-
-:::{toctree}
-:caption: Sliding Tile Attention
-:maxdepth: 1
-
-sliding_tile_attention/installation
-sliding_tile_attention/demo
-:::
-
-% What is VSA Kernel?
-
-:::{toctree}
-:caption: Video Sparse Attention
-:maxdepth: 1
-
-video_sparse_attention/installation
-:::
-
-:::{toctree}
-:caption: Design
-:maxdepth: 1
-design/overview
-:::
-
-:::{toctree}
-:caption: Developer Guide
-:maxdepth: 2
-
-contributing/overview
-contributing/developer_env/index
-contributing/profiling
-:::
-
-:::{toctree}
-:caption: API Reference
-:maxdepth: 2
-
-
-api/fastvideo/fastvideo
-:::
-
-## Indices and tables
-
-- {ref}`genindex`
-- {ref}`modindex`
+- **Getting Started**: Installation and quick start guides
+- **Inference**: Learn how to use FastVideo for video generation
+- **Training**: Data preprocessing and fine-tuning workflows
+- **Distillation**: Post-training optimization techniques
+- **Sliding Tile Attention**: Advanced attention mechanisms
+- **Video Sparse Attention**: Efficient attention for video models
+- **Design**: Framework architecture and design principles
+- **Developer Guide**: Contributing and development setup
+- **API Reference**: Complete API documentation
diff --git a/docs/source/inference/add_pipeline.md b/docs/inference/add_pipeline.md
similarity index 99%
rename from docs/source/inference/add_pipeline.md
rename to docs/inference/add_pipeline.md
index dafa5fadf..5cf1501e7 100644
--- a/docs/source/inference/add_pipeline.md
+++ b/docs/inference/add_pipeline.md
@@ -1,4 +1,3 @@
-(add-pipeline)=
# 🏗️ Adding a New Pipeline
diff --git a/docs/source/inference/cli.md b/docs/inference/cli.md
similarity index 100%
rename from docs/source/inference/cli.md
rename to docs/inference/cli.md
diff --git a/docs/source/inference/comfyui.md b/docs/inference/comfyui.md
similarity index 100%
rename from docs/source/inference/comfyui.md
rename to docs/inference/comfyui.md
diff --git a/docs/source/inference/configuration.md b/docs/inference/configuration.md
similarity index 98%
rename from docs/source/inference/configuration.md
rename to docs/inference/configuration.md
index 6462931d0..feb8c594c 100644
--- a/docs/source/inference/configuration.md
+++ b/docs/inference/configuration.md
@@ -1,4 +1,4 @@
-(inference-configuration)=
+
# Configuration
## Multi-GPU Setup
diff --git a/docs/source/inference/inference_quick_start.md b/docs/inference/inference_quick_start.md
similarity index 100%
rename from docs/source/inference/inference_quick_start.md
rename to docs/inference/inference_quick_start.md
diff --git a/docs/source/inference/optimizations.md b/docs/inference/optimizations.md
similarity index 94%
rename from docs/source/inference/optimizations.md
rename to docs/inference/optimizations.md
index 0774bf500..ec8bc69a0 100644
--- a/docs/source/inference/optimizations.md
+++ b/docs/inference/optimizations.md
@@ -1,4 +1,3 @@
-(inference-optimizations)=
# Optimizations
@@ -16,8 +15,6 @@ This page describes the various options for speeding up generation times in Fast
- Caching Techniques
- [TeaCache](#optimizations-teacache)
-(optimizations-backends)=
-
## Attention Backends
### Available Backends
@@ -49,8 +46,6 @@ You can also set the environment variable on the command line:
FASTVIDEO_ATTENTION_BACKEND=SAGE_ATTN python example.py
```
-(optimizations-flash)=
-
### Flash Attention
**`FLASH_ATTN`**
@@ -71,12 +66,6 @@ pip install ninja
python setup.py install
```
-:::{note}
-FastVideo will automatically detect and use `FA3` if it is installed when using `FLASH_ATTN` backend.
-:::
-
-(optimizations-sta)=
-
### Sliding Tile Attention
**`SLIDING_TILE_ATTN`**
@@ -87,8 +76,6 @@ pip install st_attn==0.0.4
Please see [this page](#sta-installation) for more installation instructions.
-(optimizations-vsa)=
-
### Video Sparse Attention
**`VIDEO_SPARSE_ATTN`**
@@ -100,8 +87,6 @@ python setup_vsa.py install
Please see [this page](#vsa-installation) for more installation instructions.
-(optimizations-sage)=
-
### Sage Attention
**`SAGE_ATTN`**
@@ -114,8 +99,6 @@ cd sageattention
python setup.py install # or pip install -e .
```
-(optimizations-sage3)=
-
### Sage Attention 3
**`SAGE_ATTN_THREE`**
@@ -136,8 +119,6 @@ To use Sage Attention 3 in FastVideo, first get access to the SageAttention3 cod
python setup.py install
```
-(optimizations-teacache)=
-
## Teacache
TeaCache is an optimization technique supported in FastVideo that can significantly speed up video generation by skipping redundant calculations across diffusion steps. This guide explains how to enable and configure TeaCache for optimal performance in FastVideo.
diff --git a/docs/inference/support_matrix.md b/docs/inference/support_matrix.md
new file mode 100644
index 000000000..d207d80ca
--- /dev/null
+++ b/docs/inference/support_matrix.md
@@ -0,0 +1,66 @@
+# Compatibility Matrix
+
+The table below shows every supported model and optimizations supported for them.
+
+The symbols used have the following meanings:
+
+- ✅ = Full compatibility
+- ❌ = No compatibility
+- ⭕ = Does not apply to this model
+
+## Models x Optimization
+
+The `HuggingFace Model ID` can be directly pass to `from_pretrained()` methods and FastVideo will use the optimal default parameters when initializing and generating videos.
+
+
+
+| Model Name | HuggingFace Model ID | Resolutions | TeaCache | Sliding Tile Attn | Sage Attn | VSA |
+|------------|---------------------|-------------|----------|-------------------|-----------|-----|
+| FastWan2.1 T2V 1.3B | `FastVideo/FastWan2.1-T2V-1.3B-Diffusers` | 480P | ⭕ | ⭕ | ⭕ | ✅ |
+| FastWan2.2 TI2V 5B Full Attn* | `FastVideo/FastWan2.2-TI2V-5B-FullAttn-Diffusers` | 720P | ⭕ | ⭕ | ⭕ | ✅ |
+| Wan2.2 TI2V 5B | `Wan-AI/Wan2.2-TI2V-5B-Diffusers` | 720P | ⭕ | ⭕ | ✅ | ⭕ |
+| Wan2.2 T2V A14B | `Wan-AI/Wan2.2-T2V-A14B-Diffusers` | 480P 720P | ❌ | ❌ | ✅ | ⭕ |
+| Wan2.2 I2V A14B | `Wan-AI/Wan2.2-I2V-A14B-Diffusers` | 480P 720P | ❌ | ❌ | ✅ | ⭕ |
+| HunyuanVideo | `hunyuanvideo-community/HunyuanVideo` | 720px1280p 544px960p | ❌ | ✅ | ✅ | ⭕ |
+| FastHunyuan | `FastVideo/FastHunyuan-diffusers` | 720px1280p 544px960p | ❌ | ✅ | ✅ | ⭕ |
+| Wan2.1 T2V 1.3B | `Wan-AI/Wan2.1-T2V-1.3B-Diffusers` | 480P | ✅ | ✅* | ✅ | ⭕ |
+| Wan2.1 T2V 14B | `Wan-AI/Wan2.1-T2V-14B-Diffusers` | 480P, 720P | ✅ | ✅* | ✅ | ⭕ |
+| Wan2.1 I2V 480P | `Wan-AI/Wan2.1-I2V-14B-480P-Diffusers` | 480P | ✅ | ✅* | ✅ | ⭕ |
+| Wan2.1 I2V 720P | `Wan-AI/Wan2.1-I2V-14B-720P-Diffusers` | 720P | ✅ | ✅ | ✅ | ⭕ |
+| StepVideo T2V | `FastVideo/stepvideo-t2v-diffusers` | 768px768px204f 544px992px204f 544px992px136f | ❌ | ❌ | ✅ | ⭕ |
+
+**Note**: Wan2.2 TI2V 5B has some quality issues when performing I2V generation. We are working on fixing this issue.
+
+## Special requirements
+
+### StepVideo T2V
+- The self-attention in text-encoder (step_llm) only supports CUDA capabilities sm_80 sm_86 and sm_90
+
+### Sliding Tile Attention
+- Currently only Hopper GPUs (H100s) are supported.
diff --git a/docs/make.bat b/docs/make.bat
deleted file mode 100644
index 747ffb7b3..000000000
--- a/docs/make.bat
+++ /dev/null
@@ -1,35 +0,0 @@
-@ECHO OFF
-
-pushd %~dp0
-
-REM Command file for Sphinx documentation
-
-if "%SPHINXBUILD%" == "" (
- set SPHINXBUILD=sphinx-build
-)
-set SOURCEDIR=source
-set BUILDDIR=build
-
-%SPHINXBUILD% >NUL 2>NUL
-if errorlevel 9009 (
- echo.
- echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
- echo.installed, then set the SPHINXBUILD environment variable to point
- echo.to the full path of the 'sphinx-build' executable. Alternatively you
- echo.may add the Sphinx directory to PATH.
- echo.
- echo.If you don't have Sphinx installed, grab it from
- echo.https://www.sphinx-doc.org/
- exit /b 1
-)
-
-if "%1" == "" goto help
-
-%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
-goto end
-
-:help
-%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
-
-:end
-popd
diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt
deleted file mode 100644
index 07613d669..000000000
--- a/docs/requirements-docs.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-sphinx==7.4.7
-sphinx-argparse==0.5.2
-sphinx-autodoc2==0.5.0
-sphinx-book-theme==1.1.4
-sphinx-copybutton==0.5.2
-sphinx-design==0.6.1
-sphinx-togglebutton==0.3.2
-myst-parser==3.0.1
-msgspec
-commonmark # Required by sphinx-argparse when using :markdownhelp:
-
-# packages to install to build the documentation
-cachetools
-# -f https://download.pytorch.org/whl/cpu
-torch
\ No newline at end of file
diff --git a/docs/source/sliding_tile_attention/demo.md b/docs/sliding_tile_attention/demo.md
similarity index 97%
rename from docs/source/sliding_tile_attention/demo.md
rename to docs/sliding_tile_attention/demo.md
index dadae81db..080b8e24c 100644
--- a/docs/source/sliding_tile_attention/demo.md
+++ b/docs/sliding_tile_attention/demo.md
@@ -1,4 +1,3 @@
-(sta-demo)=
# 🔍 Demo
This is is a demo for 2D STA with window size (6,6) operating on a (10, 10) image.
diff --git a/docs/source/sliding_tile_attention/installation.md b/docs/sliding_tile_attention/installation.md
similarity index 98%
rename from docs/source/sliding_tile_attention/installation.md
rename to docs/sliding_tile_attention/installation.md
index 8e9f1daec..0ed54f3db 100644
--- a/docs/source/sliding_tile_attention/installation.md
+++ b/docs/sliding_tile_attention/installation.md
@@ -1,4 +1,3 @@
-(sta-installation)=
# 🔧 Installation
You can install the Sliding Tile Attention package using
diff --git a/docs/source/_static/custom.css b/docs/source/_static/custom.css
deleted file mode 100644
index 79bd2082b..000000000
--- a/docs/source/_static/custom.css
+++ /dev/null
@@ -1,8 +0,0 @@
-.vertical-table-header th.head:not(.stub) {
- writing-mode: sideways-lr;
- white-space: nowrap;
- max-width: 0;
- p {
- margin: 0;
- }
-}
diff --git a/docs/source/_templates/sections/header.html b/docs/source/_templates/sections/header.html
deleted file mode 100644
index 80bc371c6..000000000
--- a/docs/source/_templates/sections/header.html
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
diff --git a/docs/source/api/summary.md b/docs/source/api/summary.md
deleted file mode 100644
index 4b5cdd89d..000000000
--- a/docs/source/api/summary.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# Summary
-
-## Video Generator
-
-```{autodoc2-summary}
- fastvideo.VideoGenerator
-```
-
-## Initialization Configuration
-
-```{autodoc2-summary}
- fastvideo.configs.pipelines.PipelineConfig
-```
-
-## Sampling Configuration
-
-```{autodoc2-summary}
- fastvideo.configs.sample.SamplingParam
-```
diff --git a/docs/source/autodoc2_docstring_parser.py b/docs/source/autodoc2_docstring_parser.py
deleted file mode 100644
index 32f25d3c8..000000000
--- a/docs/source/autodoc2_docstring_parser.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# type: ignore
-# SPDX-License-Identifier: Apache-2.0
-from docutils import nodes
-from myst_parser.parsers.sphinx_ import MystParser
-from sphinx.ext.napoleon import docstring
-
-
-class NapoleonParser(MystParser):
-
- def parse(self, input_string: str, document: nodes.document) -> None:
- # Get the Sphinx configuration
- config = document.settings.env.config
-
- parsed_content = str(
- docstring.GoogleDocstring(
- str(docstring.NumpyDocstring(input_string, config)),
- config,
- ))
- return super().parse(parsed_content, document)
-
-
-Parser = NapoleonParser
diff --git a/docs/source/conf.py b/docs/source/conf.py
deleted file mode 100644
index 12bd335d4..000000000
--- a/docs/source/conf.py
+++ /dev/null
@@ -1,275 +0,0 @@
-# SPDX-License-Identifier: Apache-2.0
-
-# Configuration file for the Sphinx documentation builder.
-#
-# This file only contains a selection of the most common options. For a full
-# list see the documentation:
-# https://www.sphinx-doc.org/en/master/usage/configuration.html
-
-# -- Path setup --------------------------------------------------------------
-
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-
-import datetime
-import logging
-import os
-import re
-import sys
-from pathlib import Path
-
-import requests
-
-logger = logging.getLogger(__name__)
-REPO_ROOT = Path(__file__).resolve().parent.parent.parent
-print(os.path.abspath(REPO_ROOT))
-sys.path.append(os.path.abspath(REPO_ROOT))
-
-# -- Project information -----------------------------------------------------
-
-project = 'FastVideo'
-copyright = f'{datetime.datetime.now().year}, FastVideo Team'
-author = 'the FastVideo Team'
-
-# -- General configuration ---------------------------------------------------
-
-# Add any Sphinx extension module names here, as strings. They can be
-# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
-# ones.
-extensions = [
- "sphinx.ext.napoleon",
- "sphinx.ext.linkcode",
- "sphinx.ext.intersphinx",
- "sphinx_copybutton",
- "autodoc2",
- "myst_parser",
- "sphinxarg.ext",
- "sphinx_design",
- "sphinx_togglebutton",
-]
-myst_enable_extensions = [
- "colon_fence",
- "fieldlist",
-]
-autodoc2_packages = [
- {
- "path": "../../fastvideo",
- "exclude_dirs": ["__pycache__", "third_party"],
- },
-]
-autodoc2_output_dir = "api"
-autodoc2_render_plugin = "myst"
-autodoc2_hidden_objects = ["dunder", "private", "inherited"]
-autodoc2_docstring_parser_regexes = [
- (".*", "docs.source.autodoc2_docstring_parser"),
-]
-autodoc2_sort_names = True
-autodoc2_index_template = None
-autodoc2_skip_module_regexes = [
- "fastvideo.dataset",
- "fastvideo.distill",
- "fastvideo.data_preprocess",
- "fastvideo.models",
- "fastvideo.sample",
- "fastvideo.utils",
- "fastvideo.distill_adv",
- "fastvideo.train",
-]
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
-
-# List of patterns, relative to source directory, that match files and
-# directories to ignore when looking for source files.
-# This pattern also affects html_static_path and html_extra_path.
-exclude_patterns: list[str] = ["**/*.template.md", "**/*.inc.md"]
-
-# Exclude the prompt "$" when copying code
-copybutton_prompt_text = r"\$ "
-copybutton_prompt_is_regexp = True
-
-# -- Options for HTML output -------------------------------------------------
-
-# The theme to use for HTML and HTML Help pages. See the documentation for
-# a list of builtin themes.
-#
-html_title = project
-html_theme = 'sphinx_book_theme'
-html_logo = '../../assets/logos/icon_simple.svg'
-html_theme_options = {
- 'path_to_docs': 'docs/source',
- 'repository_url': 'https://github.com/hao-ai-lab/FastVideo/',
- 'use_repository_button': True,
- 'use_edit_page_button': True,
- # Prevents the full API being added to the left sidebar of every page.
- # Reduces build time by 2.5x and reduces build size from ~225MB to ~95MB.
- 'collapse_navbar': True,
- # Makes API visible in the right sidebar on API reference pages.
- 'show_toc_level': 3,
-}
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ["_static"]
-html_js_files = ["custom.js"]
-html_css_files = ["custom.css"]
-
-myst_url_schemes = {
- 'http': None,
- 'https': None,
- 'mailto': None,
- 'ftp': None,
- "gh-issue": {
- "url":
- "https://github.com/hao-ai-lab/FastVideo/issues/{{path}}#{{fragment}}",
- "title": "Issue #{{path}}",
- "classes": ["github"],
- },
- "gh-pr": {
- "url":
- "https://github.com/hao-ai-lab/FastVideo/pull/{{path}}#{{fragment}}",
- "title": "Pull Request #{{path}}",
- "classes": ["github"],
- },
- "gh-dir": {
- "url": "https://github.com/hao-ai-lab/FastVideo/tree/main/{{path}}",
- "title": "{{path}}",
- "classes": ["github"],
- },
- "gh-file": {
- "url": "https://github.com/hao-ai-lab/FastVideo/blob/main/{{path}}",
- "title": "{{path}}",
- "classes": ["github"],
- },
-}
-
-# see https://docs.readthedocs.io/en/stable/reference/environment-variables.html # noqa
-READTHEDOCS_VERSION_TYPE = os.environ.get('READTHEDOCS_VERSION_TYPE')
-if READTHEDOCS_VERSION_TYPE == "tag":
- # remove the warning banner if the version is a tagged release
- header_file = os.path.join(os.path.dirname(__file__),
- "_templates/sections/header.html")
- # The file might be removed already if the build is triggered multiple times
- # (readthedocs build both HTML and PDF versions separately)
- if os.path.exists(header_file):
- os.remove(header_file)
-
-
-# Generate additional rst documentation here.
-def setup(app):
- from docs.source.generate_examples import generate_examples
- generate_examples()
-
-
-_cached_base: str = ""
-_cached_branch: str = ""
-
-
-def get_repo_base_and_branch(pr_number: str) -> tuple[str | None, str | None]:
- global _cached_base, _cached_branch
- if _cached_base and _cached_branch:
- return _cached_base, _cached_branch
-
- url = f"https://api.github.com/repos/hao-ai-lab/FastVideo/pulls/{pr_number}"
- response = requests.get(url)
- if response.status_code == 200:
- data = response.json()
- _cached_base = data['head']['repo']['full_name']
- _cached_branch = data['head']['ref']
- return _cached_base, _cached_branch
- else:
- logger.error("Failed to fetch PR details: %s", response)
- return None, None
-
-
-def linkcode_resolve(domain, info):
- if domain != 'py':
- return None
- if not info['module']:
- return None
-
- # Get path from module name
- file = Path(f"{info['module'].replace('.', '/')}.py")
- path = REPO_ROOT / file
- if not path.exists():
- path = REPO_ROOT / file.with_suffix("") / "__init__.py"
- if not path.exists():
- return None
-
- # Get the line number of the object
- with open(path) as f:
- lines = f.readlines()
- name = info['fullname'].split(".")[-1]
- pattern = fr"^( {{4}})*((def|class) )?{name}\b.*"
- for lineno, line in enumerate(lines, 1):
- if not line or line.startswith("#"):
- continue
- if re.match(pattern, line):
- break
-
- # If the line number is not found, return None
- if lineno == len(lines):
- return None
-
- # If the line number is found, create the URL
- filename = path.relative_to(REPO_ROOT)
- if "checkouts" in path.parts:
- # a PR build on readthedocs
- pr_number = REPO_ROOT.name
- base, branch = get_repo_base_and_branch(pr_number)
- if base and branch:
- return f"https://github.com/{base}/blob/{branch}/{filename}#L{lineno}"
- # Otherwise, link to the source file on the main branch
- return f"https://github.com/hao-ai-lab/FastVideo/blob/main/{filename}#L{lineno}"
-
-
-# Mock out external dependencies here, otherwise the autodoc pages may be blank.
-autodoc_mock_imports = [
- "blake3",
- "compressed_tensors",
- "cpuinfo",
- "cv2",
- "torch",
- "huggingface_hub",
- "torchvision",
- "transformers",
- "psutil",
- "prometheus_client",
- "sentencepiece",
- "vllm._C",
- "PIL",
- "numpy",
- 'triton',
- "tqdm",
- "tensorizer",
- "pynvml",
- "outlines",
- "xgrammar",
- "librosa",
- "soundfile",
- "gguf",
- "lark",
- "decord",
-]
-
-for mock_target in autodoc_mock_imports:
- if mock_target in sys.modules:
- logger.info(
- "Potentially problematic mock target (%s) found; "
- "autodoc_mock_imports cannot mock modules that have already "
- "been loaded into sys.modules when the sphinx build starts.",
- mock_target)
-
-intersphinx_mapping = {
- "python": ("https://docs.python.org/3", None),
- "typing_extensions":
- ("https://typing-extensions.readthedocs.io/en/latest", None),
- "aiohttp": ("https://docs.aiohttp.org/en/stable", None),
- "pillow": ("https://pillow.readthedocs.io/en/stable", None),
- "numpy": ("https://numpy.org/doc/stable", None),
- "torch": ("https://pytorch.org/docs/stable", None),
- "psutil": ("https://psutil.readthedocs.io/en/stable", None),
-}
-
-navigation_with_keys = False
diff --git a/docs/source/getting_started/installation.md b/docs/source/getting_started/installation.md
deleted file mode 100644
index e8ec58705..000000000
--- a/docs/source/getting_started/installation.md
+++ /dev/null
@@ -1,18 +0,0 @@
-(installation-index)=
-
-# 🔧 Installation
-
-FastVideo supports the following hardware platforms:
-
-:::{toctree}
-:maxdepth: 1
-:hidden:
-
-installation/gpu
-installation/mps
-:::
-
--
- - NVIDIA CUDA
--
- - Apple silicon
diff --git a/docs/source/getting_started/v1_api.md b/docs/source/getting_started/v1_api.md
deleted file mode 100644
index 2fe3695c0..000000000
--- a/docs/source/getting_started/v1_api.md
+++ /dev/null
@@ -1,83 +0,0 @@
-# V1 API
-
-FastVideo's V1 API provides a streamlined interface for video generation tasks with powerful customization options. This page documents the primary components of the API.
-
-## Video Generator
-
-This class will be the primary Python API for generating videos and images.
-
-```{autodoc2-summary}
- fastvideo.VideoGenerator
-```
-
-`````{py:class} VideoGenerator(fastvideo_args: fastvideo.fastvideo_args.FastVideoArgs, executor_class: type[fastvideo.worker.executor.Executor], log_stats: bool)
-:canonical: fastvideo.entrypoints.video_generator.VideoGenerator
-
-```{autodoc2-docstring} fastvideo.entrypoints.video_generator.VideoGenerator
-:parser: docs.source.autodoc2_docstring_parser
-```
-
-`VideoGenerator.from_pretrained()` should be the primary way of creating a new video generator.
-
-````{py:method} from_pretrained(model_path: str, device: typing.Optional[str] = None, torch_dtype: typing.Optional[torch.dtype] = None, pipeline_config: typing.Optional[typing.Union[str | fastvideo.configs.pipelines.PipelineConfig]] = None, **kwargs) -> fastvideo.entrypoints.video_generator.VideoGenerator
-:canonical: fastvideo.entrypoints.video_generator.VideoGenerator.from_pretrained
-:classmethod:
-
-```{autodoc2-docstring} fastvideo.entrypoints.video_generator.VideoGenerator.from_pretrained
-:parser: docs.source.autodoc2_docstring_parser
-```
-
-
-## Configuring FastVideo
-
-The follow two classes `PipelineConfig` and `SamplingParam` are used to configure initialization and sampling parameters, respectively.
-
-### PipelineConfig
-```{autodoc2-summary}
- fastvideo.PipelineConfig
-```
-
-`````{py:class} PipelineConfig
-:canonical: fastvideo.configs.pipelines.base.PipelineConfig
-
-```{autodoc2-docstring} fastvideo.configs.pipelines.base.PipelineConfig
-:parser: docs.source.autodoc2_docstring_parser
-```
-
-````{py:method} from_pretrained(model_path: str) -> fastvideo.configs.pipelines.base.PipelineConfig
-:canonical: fastvideo.configs.pipelines.base.PipelineConfig.from_pretrained
-:classmethod:
-
-```{autodoc2-docstring} fastvideo.configs.pipelines.base.PipelineConfig.from_pretrained
-:parser: docs.source.autodoc2_docstring_parser
-```
-
-
-````{py:method} dump_to_json(file_path: str)
-:canonical: fastvideo.configs.pipelines.base.PipelineConfig.dump_to_json
-
-```{autodoc2-docstring} fastvideo.configs.pipelines.base.PipelineConfig.dump_to_json
-:parser: docs.source.autodoc2_docstring_parser
-```
-
-
-### SamplingParam
-
-```{autodoc2-summary}
- fastvideo.SamplingParam
-```
-
-`````{py:class} SamplingParam
-:canonical: fastvideo.configs.sample.base.SamplingParam
-
-```{autodoc2-docstring} fastvideo.configs.sample.base.SamplingParam
-:parser: docs.source.autodoc2_docstring_parser
-```
-
-````{py:method} from_pretrained(model_path: str) -> fastvideo.configs.sample.base.SamplingParam
-:canonical: fastvideo.configs.sample.base.SamplingParam.from_pretrained
-:classmethod:
-
-```{autodoc2-docstring} fastvideo.configs.sample.base.SamplingParam.from_pretrained
-:parser: docs.source.autodoc2_docstring_parser
-```
diff --git a/docs/source/inference/support_matrix.md b/docs/source/inference/support_matrix.md
deleted file mode 100644
index 63bc79b2f..000000000
--- a/docs/source/inference/support_matrix.md
+++ /dev/null
@@ -1,136 +0,0 @@
-(support-matrix)=
-# Compatibility Matrix
-The table below shows every supported model and optimizations supported for them.
-
-The symbols used have the following meanings:
-
-- ✅ = Full compatibility
-- ❌ = No compatibility
-- ⭕ = Does not apply to this model
-
-## Models x Optimization
-The `HuggingFace Model ID` can be directly pass to `from_pretrained()` methods and FastVideo will use the optimal default parameters when initializing and generating videos.
-
-:::{raw} html
-
-:::
-
-:::{list-table}
-:header-rows: 1
-:stub-columns: 3
-:widths: auto
-:class: vertical-table-header
-
-- * Model Name
- * HuggingFace Model ID
- * Resolutions
- * TeaCache
- * Sliding Tile Attn
- * Sage Attn
- * Video Sparse Attention (VSA)
-- * FastWan2.1 T2V 1.3B
- * `FastVideo/FastWan2.1-T2V-1.3B-Diffusers`
- * 480P
- * ⭕
- * ⭕
- * ⭕
- * ✅
-- * FastWan2.2 TI2V 5B Full Attn*
- * `FastVideo/FastWan2.2-TI2V-5B-FullAttn-Diffusers`
- * 720P
- * ⭕
- * ⭕
- * ⭕
- * ✅
-- * Wan2.2 TI2V 5B
- * `Wan-AI/Wan2.2-TI2V-5B-Diffusers`
- * 720P
- * ⭕
- * ⭕
- * ✅
- * ⭕
-- * Wan2.2 T2V A14B
- * `Wan-AI/Wan2.2-T2V-A14B-Diffusers`
- * 480P 720P
- * ❌
- * ❌
- * ✅
- * ⭕
-- * Wan2.2 I2V A14B
- * `Wan-AI/Wan2.2-I2V-A14B-Diffusers`
- * 480P 720P
- * ❌
- * ❌
- * ✅
- * ⭕
-- * HunyuanVideo
- * `hunyuanvideo-community/HunyuanVideo`
- * 720px1280p 544px960p
- * ❌
- * ✅
- * ✅
- * ⭕
-- * FastHunyuan
- * `FastVideo/FastHunyuan-diffusers`
- * 720px1280p 544px960p
- * ❌
- * ✅
- * ✅
- * ⭕
-- * Wan2.1 T2V 1.3B
- * `Wan-AI/Wan2.1-T2V-1.3B-Diffusers`
- * 480P
- * ✅
- * ✅*
- * ✅
- * ⭕
-- * Wan2.1 T2V 14B
- * `Wan-AI/Wan2.1-T2V-14B-Diffusers`
- * 480P, 720P
- * ✅
- * ✅*
- * ✅
- * ⭕
-- * Wan2.1 I2V 480P
- * `Wan-AI/Wan2.1-I2V-14B-480P-Diffusers`
- * 480P
- * ✅
- * ✅*
- * ✅
- * ⭕
-- * Wan2.1 I2V 720P
- * `Wan-AI/Wan2.1-I2V-14B-720P-Diffusers`
- * 720P
- * ✅
- * ✅
- * ✅
- * ⭕
-- * StepVideo T2V
- * `FastVideo/stepvideo-t2v-diffusers`
- * 768px768px204f 544px992px204f 544px992px136f
- * ❌
- * ❌
- * ✅
- * ⭕
-:::
-
-**Note**: Wan2.2 TI2V 5B has some quality issues when performing I2V generation. We are working on fixing this issue.
-
-## Special requirements
-
-### StepVideo T2V
-- The self-attention in text-encoder (step_llm) only supports CUDA capabilities sm_80 sm_86 and sm_90
-
-### Sliding Tile Attention
-- Currently only Hopper GPUs (H100s) are supported.
diff --git a/docs/source/training/data_preprocess.md b/docs/training/data_preprocess.md
similarity index 98%
rename from docs/source/training/data_preprocess.md
rename to docs/training/data_preprocess.md
index ede86cbff..dd6c34990 100644
--- a/docs/source/training/data_preprocess.md
+++ b/docs/training/data_preprocess.md
@@ -1,4 +1,3 @@
-(v0-data-preprocess)=
# 🧱 Data Preprocess
diff --git a/docs/source/training/finetune.md b/docs/training/finetune.md
similarity index 99%
rename from docs/source/training/finetune.md
rename to docs/training/finetune.md
index 92636779c..390b20afd 100644
--- a/docs/source/training/finetune.md
+++ b/docs/training/finetune.md
@@ -1,4 +1,4 @@
-(v0-finetune)=
+
# 🧠 Finetune
## ⚡ Full Finetune
Ensure your data is prepared and preprocessed in the format specified in [data_preprocess.md](#v0-data-preprocess). For convenience, we also provide a mochi preprocessed Black Myth Wukong data that can be downloaded directly:
diff --git a/docs/source/video_sparse_attention/installation.md b/docs/video_sparse_attention/installation.md
similarity index 98%
rename from docs/source/video_sparse_attention/installation.md
rename to docs/video_sparse_attention/installation.md
index e436922b0..4da426b57 100644
--- a/docs/source/video_sparse_attention/installation.md
+++ b/docs/video_sparse_attention/installation.md
@@ -1,4 +1,3 @@
-(vsa-installation)=
# 🔧 Installation
You can install the Video Sparse Attention package using
diff --git a/mkdocs.yml b/mkdocs.yml
new file mode 100644
index 000000000..b93756ec8
--- /dev/null
+++ b/mkdocs.yml
@@ -0,0 +1,169 @@
+site_name: FastVideo
+site_description: A unified inference and post-training framework for accelerated video generation
+site_author: FastVideo Team
+site_url: http://127.0.0.1:8000/
+
+# Documentation directory
+docs_dir: docs
+
+# Repository
+repo_name: hao-ai-lab/FastVideo
+repo_url: https://github.com/hao-ai-lab/FastVideo
+edit_uri: edit/main/docs/
+
+# Configuration
+theme:
+ name: material
+ palette:
+ - scheme: default
+ toggle:
+ icon: material/brightness-7
+ name: Switch to dark mode
+ - scheme: slate
+ toggle:
+ icon: material/brightness-4
+ name: Switch to light mode
+ features:
+ - navigation.tabs
+ - navigation.instant
+ - navigation.tracking
+ - search.highlight
+ - search.share
+ - content.tabs.link
+ - content.code.copy
+ - content.code.annotate
+ icon:
+ logo: material/book-open-variant
+ font:
+ text: Roboto
+ code: Roboto Mono
+
+# Plugins
+plugins:
+ - search:
+ lang: en
+ - mkdocs-simple-hooks:
+ hooks:
+ on_pre_build: "docs.generate_examples:on_pre_build_hook"
+ - autorefs
+ - api-autonav:
+ modules: ["fastvideo"]
+ api_root_uri: "api"
+ exclude:
+ - "re:fastvideo\\._.*"
+ - mkdocstrings:
+ handlers:
+ python:
+ paths: [.]
+ options:
+ docstring_style: google
+ show_source: true
+ show_root_heading: true
+ show_root_toc_entry: true
+ show_symbol_type_heading: true
+ show_object_full_path: true
+ show_category_heading: true
+ signature_crossrefs: true
+ show_if_no_docstring: false
+ show_signature_annotations: true
+ separate_signature: true
+ merge_init_into_class: true
+ show_submodules: true
+ show_bases: true
+ show_root_full_path: false
+ show_root_members_full_path: false
+ inventories:
+ - https://docs.python.org/3/objects.inv
+
+
+# Markdown extensions
+markdown_extensions:
+ - pymdownx.highlight:
+ anchor_linenums: true
+ line_spans: __span
+ pygments_lang_class: true
+ - pymdownx.inlinehilite
+ - pymdownx.superfences:
+ custom_fences:
+ - name: mermaid
+ class: mermaid
+ - pymdownx.tabbed:
+ alternate_style: true
+ - pymdownx.emoji
+ - pymdownx.superfences
+ - pymdownx.arithmatex:
+ generic: true
+ - pymdownx.critic
+ - pymdownx.details
+ - pymdownx.highlight
+ - pymdownx.inlinehilite
+ - pymdownx.keys
+ - pymdownx.mark
+ - pymdownx.smartsymbols
+ - pymdownx.tasklist:
+ custom_checkbox: true
+ - pymdownx.tilde
+ - toc:
+ permalink: true
+
+# Page tree
+nav:
+ - Home: index.md
+ - Getting Started:
+ - Installation: getting_started/installation.md
+ - Quick Start: getting_started/quick_start.md
+ - V1 API: getting_started/v1_api.md
+ - Inference:
+ - Quick Start: inference/inference_quick_start.md
+ - Configuration: inference/configuration.md
+ - Optimizations: inference/optimizations.md
+ - ComfyUI: inference/comfyui.md
+ - Support Matrix: inference/support_matrix.md
+ - CLI: inference/cli.md
+ - Add Pipeline: inference/add_pipeline.md
+ - Examples:
+ - Basic: inference/examples/basic.md
+ - Optimizations: inference/examples/optimizations.md
+ - STA Mask Search: inference/examples/sta_mask_search.md
+ - Training:
+ - Data Preprocessing: training/data_preprocess.md
+ - Fine-tuning: training/finetune.md
+ - Examples:
+ - Training Index: training/examples/examples_training_index.md
+ - Wan T2V 1.3B: training/examples/wan_t2v_1.3B.md
+ - Wan I2V 14B 480p: training/examples/wan_i2v_14B_480p.md
+ - Wan2.1 Fun 1.3B InP: training/examples/Wan2.1-Fun-1.3B-InP.md
+ - Wan2.1 VSA: training/examples/Wan2.1-VSA.md
+ - Fine-tuning: training/examples/finetune.md
+ - Distillation:
+ - Data Preprocessing: distillation/data_preprocess.md
+ - DMD: distillation/dmd.md
+ - Sliding Tile Attention:
+ - Installation: sliding_tile_attention/installation.md
+ - Demo: sliding_tile_attention/demo.md
+ - Video Sparse Attention:
+ - Installation: video_sparse_attention/installation.md
+ - Design:
+ - Overview: design/overview.md
+ - Developer Guide:
+ - Overview: contributing/overview.md
+ - Developer Environment:
+ - Index: contributing/developer_env/index.md
+ - Docker: contributing/developer_env/docker.md
+ - RunPod: contributing/developer_env/runpod.md
+ - Profiling: contributing/profiling.md
+ - API Reference:
+ - FastVideo: api/fastvideo.md
+
+
+# Extra
+extra:
+ social:
+ - icon: fontawesome/brands/github
+ link: https://github.com/hao-ai-lab/FastVideo
+ version:
+ provider: mike
+
+# Custom CSS
+extra_css:
+ - assets/custom.css
\ No newline at end of file
diff --git a/requirements-mkdocs.txt b/requirements-mkdocs.txt
new file mode 100644
index 000000000..fa29dc8fe
--- /dev/null
+++ b/requirements-mkdocs.txt
@@ -0,0 +1,13 @@
+mkdocs-simple-hooks>=0.1.5
+mkdocs-minify-plugin>=0.7.0
+mkdocs>=1.5.0
+mkdocs-material>=9.4.0
+mkdocstrings>=0.24.0
+mkdocstrings-python>=1.8.0
+mkdocs-mermaid2-plugin>=1.1.0
+mkdocs-git-revision-date-localized-plugin>=1.2.0
+mkdocs-git-committers-plugin-2>=1.1.0
+mkdocs-macros-plugin>=0.8.0
+pymdown-extensions>=10.0
+mkdocs-api-autonav
+mkdocs-autorefs