forked from hao-ai-lab/FastVideo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
289 lines (243 loc) · 6.98 KB
/
Copy pathpyproject.toml
File metadata and controls
289 lines (243 loc) · 6.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "fastvideo"
version = "0.2.0"
description = "FastVideo"
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
]
dependencies = [
# Core Libraries
"scipy>=1.14.1",
"six>=1.16.0",
"h5py>=3.12.1",
"requests>=2.32.2",
# Machine Learning & Transformers
"transformers>=4.57.3",
"tokenizers>=0.20.1",
"sentencepiece>=0.2.0",
"timm>=1.0.11",
"peft>=0.15.0",
"diffusers>=0.33.1",
"torch==2.11.0",
"torchvision",
"torchaudio",
# Acceleration & Optimization
"accelerate==1.0.1",
# Computer Vision & Image Processing
"opencv-python>=4.10.0.84",
"pillow>=10.3.0",
"imageio>=2.36.0",
"imageio-ffmpeg>=0.5.1",
"einops",
# Experiment Tracking & Logging
"wandb>=0.21.0",
"loguru",
"test-tube>=0.7.5",
# Miscellaneous Utilities
"tqdm",
"pytest",
"PyYAML>=6.0.1",
"protobuf>=5.28.3",
"gradio==5.32.0",
"moviepy>=2.0.0",
"flask",
"flask_restful",
"aiohttp",
"aiofiles",
"huggingface_hub",
"cloudpickle",
"omegaconf",
# System & Monitoring Tools
"gpustat",
"watch",
"remote-pdb",
# Kernel & Packaging
"fastvideo-kernel==0.2.6",
"wheel",
# Training Dependencies
"torchdata",
"pyarrow",
"datasets>=4.0.0",
"av",
# Preprocessing Dependencies
"torchcodec",
"ray>=2.49.1",
"ftfy>=6.3.1",
# Job Runner
"fastapi>=0.129.0",
"uvicorn>=0.41.0"
]
[tool.uv]
prerelease = "allow"
[tool.uv.workspace]
members = ["apps/dreamverse"]
[tool.uv.sources]
torch = [
{ index = "pytorch-cpu", marker = "sys_platform != 'linux'" },
{ index = "pytorch-cu128", marker = "sys_platform == 'linux'" },
]
torchvision = [
{ index = "pytorch-cpu", marker = "sys_platform != 'linux'" },
{ index = "pytorch-cu128", marker = "sys_platform == 'linux'" },
]
torchaudio = [
{ index = "pytorch-cpu", marker = "sys_platform != 'linux'" },
{ index = "pytorch-cu128", marker = "sys_platform == 'linux'" },
]
imagebind = { git = "https://github.com/facebookresearch/ImageBind.git", rev = "53680b02d7e37b19b124fa37bae4b6c98c38f5be" }
flash-attn-cute = { git = "https://github.com/XOR-op/flash-attention.git", branch = "fa4-compile", subdirectory = "flash_attn/cute" }
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[[tool.uv.index]]
name = "pytorch-cu128"
url = "https://download.pytorch.org/whl/cu128"
explicit = true
[project.optional-dependencies]
# flash-attn: uv pip install flash-attn==2.8.1 --no-cache-dir --no-build-isolation
lint = [
"pre-commit==4.0.1",
"types-aiofiles",
"types-requests",
]
test = [
"av",
"pytorch-msssim>=1.0.0",
"pytest",
"pandas",
"plotly",
]
# Eval extras. See fastvideo/eval/README.md for which install path
# covers which metrics. detectron2 (vbench color/object_class/etc.) is
# CUDA-version-pinned and not cleanly pip-installable — install it
# separately as documented in the README. decord has no aarch64 wheels
# (upstream effectively unmaintained); it's split into its own extra so
# the main eval extras install on ARM systems too. eval/io/video.py has
# a PyAV fallback that covers the video-decode path without decord. The
# judge.* metrics (eval-judge) call a remote API and need a key, so they
# are opt-in and intentionally kept out of the default [eval] set.
eval-vbench = ["openai-clip", "pyiqa", "easydict"]
eval-physics-iq = []
eval-audio = ["jiwer", "librosa", "pyloudnorm", "hear21passt", "audiobox_aesthetics", "imagebind", "pytorchvideo"]
eval-judge = ["google-genai"]
eval = [
"lpips", "ptlflow", "qwen-vl-utils",
"fastvideo[eval-vbench]", "fastvideo[eval-physics-iq]",
]
eval-fast-decode = ["decord"]
eval-full = ["fastvideo[eval]", "fastvideo[eval-audio]", "qwen-omni-utils"]
dev = [ "fastvideo[lint]", "fastvideo[test]", ]
prompt-safety = [
"fasttext",
]
prompt-enhancer = [
"httpx",
]
streaming = [
"fastvideo[prompt-enhancer]",
"fastvideo[prompt-safety]",
"websockets",
]
dreamverse = [
"uvicorn[standard]>=0.41.0",
"cerebras-cloud-sdk",
# PyPI forbids direct URL deps in published metadata; pin the fork via
# [tool.uv.sources] above (same pattern as imagebind) so the wheel stays
# publishable while uv workspace installs still get the fork.
"flash-attn-cute",
"flashinfer-python",
"openai>=1.40",
]
rocm = [
"amdsmi",
]
[project.scripts]
fastvideo = "fastvideo.entrypoints.cli.main:main"
dreamverse-server = "dreamverse.server_entry:cli"
dreamverse-mock-server = "dreamverse.mock_server:cli"
[tool.setuptools.packages.find]
where = [".", "apps/dreamverse"]
exclude = ["assets*", "docker*", "docs", "scripts*", "apps*", "dreamverse.tests*"]
[tool.setuptools.package-data]
dreamverse = ["prompts/*.md"]
[tool.wheel]
exclude = ["assets*", "docker*", "docs", "scripts*", "apps*"]
[tool.pytest.ini_options]
markers = [
"gpu: requires real GPU + model weights; skip in CI",
]
[tool.mypy]
warn_unused_configs = true
ignore_missing_imports = true
disallow_untyped_calls = true
check_untyped_defs = true
follow_imports = "silent"
[tool.codespell]
# ``*/_vendored/*`` matches upstream-provenance files vendored under any
# ``_vendored/`` subdir (project-wide convention; mirrors the
# ``_``-prefixed auto-discovery skip).
skip = "./data,./wandb,ui/package-lock.json,*/_vendored/*"
# "tread" matches daVinci-MagiHuman's acronym "TReAD" (Token Routing and
# Early Drop). codespell lowercases ignore-words entries, so the single
# lowercase form silences all case variants.
ignore-words-list = "tread,passt"
[tool.ruff]
# Allow lines to be as long as 120.
line-length = 120
extend-exclude = [
# Upstream submodules under fastvideo/third_party/ are not our style
# territory; modern-dep compat lives as runtime shims in our metric
# __init__.py files.
"fastvideo/third_party/**",
]
[tool.ruff.lint]
select = [
# pycodestyle
"E",
# Pyflakes
"F",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# flake8-simplify
"SIM",
# isort
# "I",
"G",
]
ignore = [
# star imports
"F405", "F403",
# lambda expression assignment
"E731",
# Loop control variable not used within loop body
"B007",
# f-string format
"UP032",
# line too long
"E501",
]
[tool.ruff.lint.per-file-ignores]
# Ignore all files that end in `_test.py`.
"fastvideo/models/hunyuan/diffusion/pipelines/pipeline_hunyuan_video.py" = ["E741"]
[tool.yapf]
column_limit = 120
[tool.isort]
line_length = 120
use_parentheses = true
skip_gitignore = true
[project.urls]
Repository = "https://github.com/hao-ai-lab/FastVideo"
# Used by Comfy Registry https://comfyregistry.org
[tool.comfy]
PublisherId = "fastvideo"
DisplayName = "FastVideo"
Icon = "https://raw.githubusercontent.com/hao-ai-lab/FastVideo/main/comfyui/assets/icon_simple.svg"