Implemented demucs engine

This commit is contained in:
patben8 committed 2026-10-01 10:54:27 +02:00
1 parent 28b705173e
commit 27471a82cd
12 files changed
+694 -12

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
# PyInstaller spec for the frozen stem engine. ONEDIR, not onefile: a onefile
# build re-extracts ~500 MB of torch into a temp folder on EVERY launch; the
# folder is instead unpacked once, into app-data, by Konduktor's engine manager.
#
# .venv/bin/python -m PyInstaller --noconfirm --clean konduktor-engine.spec
from PyInstaller.utils.hooks import collect_submodules
hidden = collect_submodules("demucs")
a = Analysis(
["engine_main.py"],
pathex=["."],
hiddenimports=hidden,
excludes=[
# Never used for inference, and large.
"tkinter", "matplotlib", "IPython", "notebook", "tensorboard",
"torchvision", "torchaudio", "PIL",
# The engine never goes online: Konduktor downloads the weights.
"huggingface_hub", "hf_xet",
],
)
# torch ships C++ headers (tens of MB, thousands of files) that only matter for
# building extensions; they are also the deepest paths in the tree, which is
# what trips Windows' 260-character limit.
a.datas = [d for d in a.datas if "/include/" not in d[0].replace("\\", "/")
and not d[0].replace("\\", "/").startswith("torch/include")]
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name="konduktor-engine",
console=True,
upx=False,
)
coll = COLLECT(exe, a.binaries, a.datas, name="konduktor-engine", upx=False)