forked from daydreamlive/scope
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
208 lines (189 loc) · 6.05 KB
/
pyproject.toml
File metadata and controls
208 lines (189 loc) · 6.05 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
[project]
name = "daydream-scope"
version = "0.1.0"
description = "A tool for running and customizing real-time, interactive generative AI pipelines and models"
readme = "README.md"
requires-python = ">=3.12"
authors = [
{name = "Yondon Fu", email = "yondon@livepeer.org"},
{name = "Rafal Leszko", email = "rafal@livepeer.org"}
]
maintainers = [
{name = "Yondon Fu", email = "yondon@livepeer.org"},
{name = "Rafal Leszko", email = "rafal@livepeer.org"}
]
keywords = ["ai", "video", "streaming", "webrtc", "diffusion", "real-time"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Multimedia :: Video",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"aiortc>=1.13.0",
"aiohttp>=3.9.0",
"fastapi>=0.116.1",
"httpx>=0.28.1",
"twilio>=9.8.0",
"uvicorn>=0.35.0",
"torch==2.9.1",
"torchvision==0.24.1",
"easydict>=1.13",
"diffusers>=0.31.0",
"ftfy>=6.3.1",
"transformers>=4.49.0",
"einops>=0.8.1",
"lmdb>=1.7.3",
"omegaconf>=2.3.0",
"accelerate>=1.1.1",
"flash-attn==2.8.3; sys_platform == 'linux' or sys_platform == 'win32'",
"sageattention==2.2.0; sys_platform == 'linux' or sys_platform == 'win32'",
"safetensors>=0.6.2",
"huggingface_hub>=0.25.0",
"pluggy>=1.5.0",
"click>=8.3.1",
"peft>=0.17.1",
"torchao==0.15.0",
"kernels>=0.10.4",
"triton==3.5.1; sys_platform == 'linux'",
"triton-windows==3.5.1.post24; sys_platform == 'win32'",
"SpoutGL>=0.1.1; sys_platform == 'win32'",
"PyOpenGL>=3.1.10; sys_platform == 'win32'",
]
[project.optional-dependencies]
kafka = [
"aiokafka>=0.10.0",
]
[project.scripts]
daydream-scope = "scope.server.app:main"
build = "scope.server.build:main"
download_models = "scope.server.download_models:main"
[project.urls]
Homepage = "https://github.com/daydreamlive/scope"
Repository = "https://github.com/daydreamlive/scope"
Issues = "https://github.com/daydreamlive/scope/issues"
[tool.uv]
preview = true
# Override cuDNN version to fix PyTorch 2.9.1 Conv3D bf16 performance regression
# See: https://github.com/pytorch/pytorch/issues/168167
override-dependencies = [
"nvidia-cudnn-cu12>=9.15; sys_platform == 'linux' or sys_platform == 'win32'",
]
[tool.uv.extra-build-dependencies]
flash-attn = [{ requirement = "torch", match-runtime = true, marker = "sys_platform == 'linux' or sys_platform == 'win32'" }]
[tool.uv.extra-build-variables]
flash-attn = { FLASH_ATTENTION_SKIP_CUDA_BUILD = "TRUE" }
[tool.uv.sources]
torch = [
{ index = "pytorch-cu128", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
]
torchvision = [
{ index = "pytorch-cu128", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
]
flash-attn = [
# Prebuilt Linux wheels from https://github.com/Dao-AILab/flash-attention
{ url = "https://github.com/Dao-AILab/flash-attention/releases/download/v2.8.3/flash_attn-2.8.3+cu12torch2.9cxx11abiTRUE-cp312-cp312-linux_x86_64.whl", marker = "sys_platform == 'linux'" },
# Prebuilt Windows wheels from https://github.com/kingbri1/flash-attention
{ url = "https://github.com/kingbri1/flash-attention/releases/download/v2.8.3/flash_attn-2.8.3+cu128torch2.9.0cxx11abiFALSE-cp312-cp312-win_amd64.whl", marker = "sys_platform == 'win32'" },
]
sageattention = [
# Prebuilt Linux wheels from https://huggingface.co/Kijai/PrecompiledWheels
{ url = "https://huggingface.co/Kijai/PrecompiledWheels/resolve/main/sageattention-2.2.0-cp312-cp312-linux_x86_64.whl", marker = "sys_platform == 'linux'" },
# Prebuilt Windows wheels from https://github.com/woct0rdho/SageAttention/releases
{ url = "https://github.com/woct0rdho/SageAttention/releases/download/v2.2.0-windows.post4/sageattention-2.2.0+cu128torch2.9.0andhigher.post4-cp39-abi3-win_amd64.whl", marker = "sys_platform == 'win32'" },
]
[[tool.uv.index]]
name = "pytorch-cu128"
url = "https://download.pytorch.org/whl/cu128"
explicit = true
[dependency-groups]
dev = [
"imageio>=2.37.0",
"imageio-ffmpeg>=0.6.0",
"ruff==0.14.11",
"pre-commit>=4.0.0",
"twine>=5.0.0",
"pytest>=8.4.2",
"freezegun>=1.5.5",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.ruff]
line-length = 88
target-version = "py312"
exclude = [
"*/vendor/*",
"**/vendor/**",
"*/modules/*",
"**/modules/**",
".venv",
"__pycache__",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long, handled by formatter
"B008", # function call in argument defaults (FastAPI Depends pattern)
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.ruff.lint.isort]
known-first-party = ["src"]
[build-system]
requires = ["hatchling", "editables"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/scope"]
[tool.hatch.build.targets.wheel.force-include]
# Include .pth file for automatic cuDNN patching at Python startup
"patches.pth" = "patches.pth"
[tool.hatch.build]
include = [
"frontend/dist/assets/**/*",
"frontend/dist/index.html",
"./README.md",
"./LICENSE.md",
"*.toml",
".python-version",
"./*.yaml",
"./*.yml",
"./*.json",
]
exclude = [
"__pycache__/**/*",
"*.pyc",
"*.pyo",
"*.pyd",
".pytest_cache/**/*",
".coverage",
"htmlcov/**/*",
".tox/**/*",
".venv/**/*",
"venv/**/*",
"env/**/*",
".env",
".env.*",
"*.egg-info/**/*",
"dist/**/*",
"build/**/*",
"models/**/*",
]