Upload setup.py with huggingface_hub
Browse files
setup.py
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
import platform
|
| 3 |
+
import os
|
| 4 |
+
from setuptools import find_packages, setup
|
| 5 |
+
|
| 6 |
+
# add fused `anti_alias_activation` cuda extension if CUDA is available
|
| 7 |
+
anti_alias_activation_cuda_ext = None
|
| 8 |
+
if platform.system() != "Darwin":
|
| 9 |
+
try:
|
| 10 |
+
from torch.utils import cpp_extension
|
| 11 |
+
if cpp_extension.CUDA_HOME is not None:
|
| 12 |
+
anti_alias_activation_cuda_ext = cpp_extension.CUDAExtension(
|
| 13 |
+
name="indextts.BigVGAN.alias_free_activation.cuda.anti_alias_activation_cuda",
|
| 14 |
+
sources=[
|
| 15 |
+
"indextts/BigVGAN/alias_free_activation/cuda/anti_alias_activation.cpp",
|
| 16 |
+
"indextts/BigVGAN/alias_free_activation/cuda/anti_alias_activation_cuda.cu",
|
| 17 |
+
],
|
| 18 |
+
include_dirs=["indextts/BigVGAN/alias_free_activation/cuda"],
|
| 19 |
+
extra_compile_args={
|
| 20 |
+
"cxx": ["-O3"],
|
| 21 |
+
"nvcc": [
|
| 22 |
+
"-O3",
|
| 23 |
+
"--use_fast_math",
|
| 24 |
+
"-U__CUDA_NO_HALF_OPERATORS__",
|
| 25 |
+
"-U__CUDA_NO_HALF_CONVERSIONS__",
|
| 26 |
+
"--expt-relaxed-constexpr",
|
| 27 |
+
"--expt-extended-lambda",
|
| 28 |
+
],
|
| 29 |
+
},
|
| 30 |
+
)
|
| 31 |
+
else:
|
| 32 |
+
print("CUDA_HOME is not set. Skipping anti_alias_activation CUDA extension.")
|
| 33 |
+
except ImportError:
|
| 34 |
+
print("PyTorch is not installed. Skipping torch extension.")
|
| 35 |
+
|
| 36 |
+
setup(
|
| 37 |
+
name="indextts",
|
| 38 |
+
version="0.1.4",
|
| 39 |
+
author="Index SpeechTeam",
|
| 40 |
+
author_email="xuanwu@bilibili.com",
|
| 41 |
+
long_description=open("README.md", encoding="utf8").read(),
|
| 42 |
+
long_description_content_type="text/markdown",
|
| 43 |
+
description="An Industrial-Level Controllable and Efficient Zero-Shot Text-To-Speech System",
|
| 44 |
+
url="https://github.com/index-tts/index-tts",
|
| 45 |
+
packages=find_packages(),
|
| 46 |
+
include_package_data=True,
|
| 47 |
+
install_requires=[
|
| 48 |
+
"torch>=2.1.2",
|
| 49 |
+
"torchaudio",
|
| 50 |
+
"transformers==4.36.2",
|
| 51 |
+
"accelerate",
|
| 52 |
+
"tokenizers==0.15.0",
|
| 53 |
+
"einops==0.8.1",
|
| 54 |
+
"matplotlib==3.8.2",
|
| 55 |
+
"omegaconf",
|
| 56 |
+
"sentencepiece",
|
| 57 |
+
"librosa",
|
| 58 |
+
"numpy",
|
| 59 |
+
"wetext" if platform.system() == "Darwin" else "WeTextProcessing",
|
| 60 |
+
],
|
| 61 |
+
extras_require={
|
| 62 |
+
"webui": ["gradio"],
|
| 63 |
+
},
|
| 64 |
+
ext_modules=[anti_alias_activation_cuda_ext] if anti_alias_activation_cuda_ext else [],
|
| 65 |
+
cmdclass={"build_ext": cpp_extension.BuildExtension} if anti_alias_activation_cuda_ext else {},
|
| 66 |
+
entry_points={
|
| 67 |
+
"console_scripts": [
|
| 68 |
+
"indextts = indextts.cli:main",
|
| 69 |
+
]
|
| 70 |
+
},
|
| 71 |
+
license="Apache-2.0",
|
| 72 |
+
python_requires=">=3.10",
|
| 73 |
+
classifiers=[
|
| 74 |
+
"Programming Language :: Python :: 3.10",
|
| 75 |
+
"Operating System :: OS Independent",
|
| 76 |
+
"Intended Audience :: Science/Research",
|
| 77 |
+
"Topic :: Scientific/Engineering",
|
| 78 |
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
| 79 |
+
],
|
| 80 |
+
)
|