-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
223 lines (203 loc) · 5.95 KB
/
Copy pathpyproject.toml
File metadata and controls
223 lines (203 loc) · 5.95 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
[build-system]
requires = ["setuptools>=61.0", "wheel", "setuptools-scm>=6.2"]
build-backend = "setuptools.build_meta"
[project]
name = "telefuser"
dynamic = ["version"]
description = "A framework for efficient model inference with multimodal generation models"
readme = "README.md"
requires-python = ">=3.10,<3.14"
license = {text = "Apache-2.0"}
authors = [
{name = "TeleAI Team"}
]
keywords = ["multimodal", "diffusion", "transformer", "inference", "serving"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
# Core runtime dependencies (required for actual usage)
"diffusers>=0.36.0",
"gradio==5.50",
"tqdm>=4.66.0",
"imageio[ffmpeg]>=2.37.2",
"transformers==4.57.3",
"safetensors",
"einops",
"loguru",
"openai",
"fastapi",
"click",
"ftfy",
"ray",
"pydantic>=2.0.0",
"pydantic-settings>=2.0.0",
"torchvision",
]
[project.optional-dependencies]
# Latent cache subsystem (telefuser.cache_mem).
# Required only when the service is started with enable_latent_cache=true
# (or when running the wan22 service example with cache_mem). Installing
# without this extra leaves the cache layer disabled and adds zero overhead.
cache = [
"faiss-cpu",
"scipy",
"qwen_vl_utils",
"sentencepiece",
"protobuf",
]
dev = [
"pytest>=7.0.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.0.0",
"pre-commit==4.0.1",
"psutil>=7.2.0",
"Pillow>=9.0.0",
"scikit-image>=0.19.0",
"uv"
]
docs = [
"mkdocs>=1.5.0",
"mkdocs-api-autonav",
"mkdocs-material",
"mkdocstrings-python",
"mkdocs-gen-files",
"mkdocs-awesome-nav",
"mkdocs-glightbox",
"mkdocs-git-revision-date-localized-plugin",
"mkdocs-minify-plugin",
"mkdocs-static-i18n",
"regex",
"ruff==0.9.4",
]
webrtc = [
"aiortc>=1.9.0",
"opencv-python-headless>=4.0",
]
[project.urls]
Homepage = "https://www.srdcloud.cn/code/49596/repoView/372413/codeFile/tree"
Repository = "https://www.srdcloud.cn/code/49596/repoView/372413/codeFile/tree"
[project.scripts]
telefuser = "telefuser.entrypoints.cli.main:main"
[tool.setuptools.packages.find]
where = ["."]
include = ["telefuser*"]
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v",
"--strict-markers",
"--tb=short",
"-ra",
]
markers = [
"slow: marks tests as slow",
"gpu: marks tests that require GPU",
"multi_gpu: marks tests that require multiple GPUs",
"distributed: marks tests that require distributed setup",
"quant: marks tests that require quantization support",
"filesystem: marks tests that require filesystem access (skipped in CI)",
"integration: marks tests that start a real server and make HTTP requests",
]
[tool.coverage.run]
source = ["telefuser"]
omit = [
"*/tests/*",
"*/tf-kernel/*",
"*/examples/*",
# Modules that require GPU/models - temporarily excluded from coverage
"*/models/*",
"*/pipelines/*",
"*/orchestrator/*",
"*/kernel/*",
"*/service/*.py",
"*/worker/*",
"*/utils/hf_utils.py",
"*/utils/lora_loader.py",
"*/utils/profiler.py",
"*/utils/system.py",
"*/utils/torch_compile.py",
"*/utils/video.py",
"*/utils/func.py",
"*/distributed/a2a.py",
"*/distributed/fsdp.py",
"*/distributed/parallel_shard.py",
"*/distributed/tp_parallelize.py",
"*/schedulers/lcm.py",
"*/schedulers/unipc.py",
"*/feature_cache/ada_taylor_cache/params/*",
]
branch = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"@pytest.mark.gpu",
]
# fail_under = 40 # Temporarily disabled until more tests are added
[tool.ruff]
line-length = 120
exclude = [
".eggs",
".git",
".hg",
".mypy_cache",
".tox",
".venv",
"build",
"dist",
"tf-kernel",
"benchmarks",
"telefuser/_version.py"
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"ANN", # flake8-annotations: type annotation checks
]
ignore = [
"E203", # whitespace before ':' (conflicts with black)
"F401",
"E402",
"E712",
# Type annotation rules - adjust based on project needs
"ANN401", # Allow dynamically typed expressions (Any) for flexibility
# Return type annotations - disabled to reduce annotation burden
"ANN001", # Missing return type annotation for public function
"ANN201", # Missing return type annotation for public function
"ANN202", # Missing return type annotation for private method
"ANN204", # Missing return type annotation for special method (__init__)
"ANN205", # Missing return type annotation for static method
"ANN206", # Missing return type annotation for class method
# Variable argument annotations - disabled for flexibility
"ANN002", # Missing type annotation for `*args`
"ANN003", # Missing type annotation for `**kwargs`
]
[tool.ruff.lint.per-file-ignores]
"examples/**" = ["E501", "ANN"] # Allow long lines and missing annotations in examples
"tests/**" = ["E501", "ANN"] # Allow long lines and missing annotations in tests
"telefuser/kernel/triton/**" = ["ANN"] # Allow missing annotations in triton kernels
[tool.ruff.lint.isort]
known-first-party = ["telefuser"]
case-sensitive = true
[tool.setuptools_scm]
write_to = "telefuser/_version.py"