2023-08-02 21:53:35 +00:00
|
|
|
import subprocess
|
2023-08-24 19:27:36 +00:00
|
|
|
import sys
|
2023-08-02 21:53:35 +00:00
|
|
|
from pathlib import Path
|
|
|
|
from datetime import datetime
|
|
|
|
from setuptools import setup, find_packages
|
|
|
|
|
|
|
|
def shell(*args):
|
|
|
|
out = subprocess.check_output(args)
|
|
|
|
return out.decode("ascii").strip()
|
|
|
|
|
|
|
|
def write_version(version_core, pre_release=True):
|
|
|
|
if pre_release:
|
|
|
|
time = shell("git", "log", "-1", "--format=%cd", "--date=iso")
|
|
|
|
time = datetime.strptime(time, "%Y-%m-%d %H:%M:%S %z")
|
|
|
|
time = time.strftime("%Y%m%d%H%M%S")
|
|
|
|
version = f"{version_core}-dev{time}"
|
|
|
|
else:
|
|
|
|
version = version_core
|
|
|
|
|
|
|
|
with open(Path("vall_e", "version.py"), "w") as f:
|
|
|
|
f.write('__version__ = "{}"\n'.format(version))
|
|
|
|
|
|
|
|
return version
|
|
|
|
|
|
|
|
with open("README.md", "r") as f:
|
|
|
|
long_description = f.read()
|
|
|
|
|
|
|
|
setup(
|
|
|
|
name="vall-e",
|
|
|
|
python_requires=">=3.10.0",
|
|
|
|
version=write_version("0.0.1"),
|
|
|
|
description="An unofficial implementation of the audio LM VALL-E",
|
|
|
|
author="ecker",
|
|
|
|
author_email="mrq@ecker.tech",
|
|
|
|
long_description=long_description,
|
|
|
|
long_description_content_type="text/markdown",
|
|
|
|
packages=find_packages(),
|
2024-06-08 01:23:53 +00:00
|
|
|
install_requires=(
|
|
|
|
# training backends
|
2024-11-04 01:19:15 +00:00
|
|
|
["deepspeed>=0.7.7"] if not sys.platform.startswith("win") else ["psutil"])
|
2024-06-08 01:23:53 +00:00
|
|
|
+ [
|
|
|
|
# logging niceties
|
2024-11-20 18:33:01 +00:00
|
|
|
"coloredlogs>=15.0.1", # barely required
|
|
|
|
"humanize>=4.4.0", # not really required
|
|
|
|
"matplotlib>=3.6.0", # only required for plotting
|
|
|
|
"pandas>=1.5.0", # not really required
|
2024-06-08 01:23:53 +00:00
|
|
|
|
|
|
|
# boiler plate niceties
|
2024-11-20 18:33:01 +00:00
|
|
|
#"diskcache>=5.4.0",
|
|
|
|
"einops>=0.6.0", # could be replaced
|
2024-06-08 01:23:53 +00:00
|
|
|
"tqdm",
|
|
|
|
|
|
|
|
# HF bloat
|
2024-06-13 18:03:36 +00:00
|
|
|
"tokenizers",
|
|
|
|
"transformers",
|
2024-08-04 04:15:20 +00:00
|
|
|
"safetensors",
|
2023-08-02 21:53:35 +00:00
|
|
|
|
2024-06-08 01:23:53 +00:00
|
|
|
# training bloat
|
|
|
|
"auraloss[all]", # [all] is needed for MelSTFTLoss
|
|
|
|
"h5py",
|
|
|
|
"prodigyopt @ git+https://github.com/konstmish/prodigy",
|
|
|
|
|
|
|
|
# practically the reason to use python
|
|
|
|
"numpy",
|
2023-08-02 21:53:35 +00:00
|
|
|
"torch>=1.13.0",
|
|
|
|
"torchaudio>=0.13.0",
|
|
|
|
"torchmetrics",
|
|
|
|
|
2024-06-08 01:23:53 +00:00
|
|
|
# core foundations
|
|
|
|
"phonemizer>=2.1.0",
|
|
|
|
"encodec>=0.1.1",
|
2023-08-02 21:53:35 +00:00
|
|
|
"vocos",
|
2024-06-08 01:23:53 +00:00
|
|
|
|
2024-11-20 18:33:01 +00:00
|
|
|
# for the web UI
|
|
|
|
"gradio",
|
2023-08-02 21:53:35 +00:00
|
|
|
],
|
2024-06-08 01:23:53 +00:00
|
|
|
extras_require = {
|
|
|
|
"all": [
|
|
|
|
# retnet backend (even though two internal copies exist)
|
|
|
|
"torchscale @ git+https://git.ecker.tech/mrq/torchscale",
|
|
|
|
# bitnet
|
|
|
|
"bitnet",
|
|
|
|
# mamba
|
|
|
|
"causal-conv1d",
|
|
|
|
"mamba-ssm",
|
|
|
|
|
|
|
|
# attention helpers
|
|
|
|
"xformers",
|
2024-12-03 21:14:57 +00:00
|
|
|
"sageattention==1.0.6",
|
2024-06-08 01:23:53 +00:00
|
|
|
# "flash-attn" --no-build-isolation # commented out right now because I want to query this for Volta freaks like me who can't use it
|
2024-11-20 18:33:01 +00:00
|
|
|
|
|
|
|
# other audio backend that doesn't prove fruitful
|
|
|
|
"descript-audio-codec",
|
2024-06-08 01:23:53 +00:00
|
|
|
]
|
|
|
|
},
|
2023-08-02 21:53:35 +00:00
|
|
|
url="https://git.ecker.tech/mrq/vall-e",
|
|
|
|
)
|