-
-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathpyproject.toml
More file actions
283 lines (259 loc) · 6.41 KB
/
pyproject.toml
File metadata and controls
283 lines (259 loc) · 6.41 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
[build-system]
requires = ["uv_build>=0.9.11,<0.10.0"]
build-backend = "uv_build"
[project]
name = "ultimate-rvc"
version = "0.6.0"
description = "Ultimate RVC"
readme = "README.md"
requires-python = ">=3.12,<3.14"
dependencies = [
#Validation
"pydantic==2.11.7",
"lazy-loader==0.4.0",
# CLI
"typer==0.20.0",
# Networking
"requests==2.32.5",
"yt_dlp[default]>=2025.11.12",
"nodejs-wheel-binaries==24.12.0",
"wget==3.2",
# Data science
"numpy==2.3.5",
"scipy==1.16.3",
"matplotlib==3.10.8",
"tqdm==4.67.1",
"gradio==5.49.1",
"pandas-stubs==2.3.3.251201",
# Machine learning
"torchcrepe==0.0.24",
"faiss-cpu==1.13.1",
# Version of onnxruntime-gpu needs to align with what
# version audio-separator package uses.
"onnxruntime-gpu==1.23.2",
"local-attention==1.11.2",
"einops==0.8.1",
"transformers==4.57.3",
"torchfcpe==0.0.4",
"tensorboardX==2.6.4",
"tensorboard==2.20.0",
"torch-tb-profiler==0.4.3",
# Audio
"static-ffmpeg==2.13",
"static-sox==1.0.2",
"typed-ffmpeg==3.8.1",
"soundfile==0.13.1",
"librosa==0.11.0",
"sox==1.5.0",
"soxr==1.0.0",
"pydub==0.25.1",
"pydub-stubs==0.25.1.6",
"pedalboard==0.9.19",
"audio-separator[gpu]==0.40.0",
"noisereduce==3.0.3",
"edge-tts==7.2.7",
# TODO potentially add these later
# below package outcommented until we use dio,pm and harvest
#"pyworld-fixed==0.3.8",
# below package outcommented until we use praat
# (for example for formant shifting with "change gender command")
#"praat-parselmouth==0.4.5",
]
[dependency-groups]
dev = [
"pre-commit==4.5.0",
"pytest==9.0.2",
"pytest-xdist==3.8.0",
"pytest-cov==7.0.0",
"pytest-mock==3.15.1",
"pytest-asyncio==1.3.0",
"pytest-timeout==2.4.0",
"faker==38.2.0",
]
[project.optional-dependencies]
cuda = ["torch==2.7.1+cu128", "torchaudio==2.7.1+cu128"]
rocm = [
"torch==2.6.0+rocm6.2.4 ; sys_platform == 'linux'",
"torchaudio==2.6.0+rocm6.2.4 ; sys_platform == 'linux'",
"pytorch-triton-rocm==3.2.0 ; sys_platform == 'linux'",
]
[project.scripts]
urvc = "ultimate_rvc.cli.main:app"
urvc-web = "ultimate_rvc.web.main:app_wrapper"
[tool.uv]
environments = ["sys_platform == 'win32'", "sys_platform == 'linux'"]
cache-dir = "./uv/cache"
compile-bytecode = true
conflicts = [[{ extra = "cuda" }, { extra = "rocm" }]]
[tool.uv.sources]
torch = [
{ index = "torch-rocm", extra = "rocm" },
{ index = "torch-cu128", extra = "cuda" },
]
torchaudio = [
{ index = "torch-rocm", extra = "rocm" },
{ index = "torch-cu128", extra = "cuda" },
]
pytorch-triton-rocm = [{ index = "torch-rocm", extra = "rocm" }]
[[tool.uv.index]]
name = "torch-cu128"
url = "https://download.pytorch.org/whl/cu128"
explicit = true
[[tool.uv.index]]
name = "torch-rocm"
url = "https://download.pytorch.org/whl/rocm6.2.4"
explicit = true
[tool.pyright]
stubPath = "src/ultimate_rvc/stubs"
pythonVersion = "3.12"
pythonPlatform = "All"
typeCheckingMode = "strict"
ignore = ["**/.venv"]
exclude = ["./uv", "src/ultimate_rvc/rvc"]
venvPath = "."
venv = "uv/.venv"
[tool.black]
target-version = ['py312', 'py313']
preview = true
enable-unstable-feature = ["string_processing"]
[tool.ruff]
target-version = "py312"
fix = true
required-version = ">=0.5.7"
[tool.ruff.format]
docstring-code-format = true
preview = true
[tool.ruff.lint]
select = ["ALL"]
ignore = [
# Ignore missing blank before between class name and docstring
"D203",
# Do not require a description after summary line in docstring
"D205",
# Do not require summary line to be located on first physical line of docstring
"D212",
# Do not require docstring section names to end with colon
"D416",
# Ignore TODO notes
"FIX002",
"TD002",
"TD003",
"TD004",
# Ignore missing copyright notice
"CPY001",
# Ignore function signatures with too many arguments
"PLR0913",
# ignore function signatures with too many positional arguments
"PLR0917",
# Ignore boolean positional argument in function signature
"FBT002",
"FBT001",
"COM812", # ignore missing trailing comma as formatter will add it
]
unfixable = ["F401"]
preview = true
[tool.ruff.lint.per-file-ignores]
"*.ipynb" = ["T201"] # Allow print statements in Jupyter notebooks
"tests/**/*.py" = [
"S101",
"PLR6301",
] # Allow assert statements in test files, ignore unused self in pytest test methods
[tool.ruff.lint.flake8-annotations]
#ignore-fully-untyped = true
[tool.ruff.lint.isort]
relative-imports-order = "closest-to-furthest"
section-order = [
"future",
"typing",
"importing",
"standard-library",
"third-party",
"networking",
"validation",
"data-science",
"machine-learning",
"audio",
"cli",
"first-party",
"ultimate_rvc",
"local-folder",
]
[tool.ruff.lint.isort.sections]
"typing" = ["typing", "typing_extensions"]
"importing" = ["lazy_loader"]
"networking" = [
"requests",
"yt_dlp",
"deemix",
"wget",
"flask",
"beautifulsoup4",
"pypresence",
]
"validation" = ["pydantic"]
"data-science" = ["numpy", "scipy", "matplotlib", "tqdm", "pandas", "gradio"]
"machine-learning" = [
"torch",
"torchaudio",
"transformers",
"torchcrepe",
"faiss",
"tensorboard",
"local_attention",
"einops",
]
"audio" = [
"static_ffmpeg",
"static_sox",
"ffmpeg",
"soundfile",
"librosa",
"sox",
"pydub",
"pedalboard",
"audio_separator",
"parselmouth",
"pyworld",
"noisereduce",
"audio_upscaler",
"edge_tts",
]
"cli" = ["typer", "rich"]
"ultimate_rvc" = ["ultimate_rvc"]
[tool.ruff.lint.pycodestyle]
max-doc-length = 72
[tool.pytest.ini_options]
minversion = "8.0"
testpaths = ["tests"]
pythonpath = ["src"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--strict-markers",
"--strict-config",
"--color=yes",
"--tb=short",
"--cov=src/ultimate_rvc",
"--cov-report=html:htmlcov",
"--cov-report=term-missing:skip-covered",
"--cov-fail-under=90",
"--durations=10",
"--doctest-modules",
"--doctest-continue-on-failure",
"--doctest-ignore-import-errors",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"gpu: marks tests as requiring GPU",
"network: marks tests as requiring network access",
"audio: marks tests as audio processing tests",
"cli: marks tests as CLI interface tests",
]
timeout = 300
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS NUMBER"
log_cli = true
log_cli_level = "WARN"