-
Notifications
You must be signed in to change notification settings - Fork 312
Expand file tree
/
Copy pathsetup.py
More file actions
82 lines (77 loc) · 2.75 KB
/
setup.py
File metadata and controls
82 lines (77 loc) · 2.75 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
from setuptools import find_packages, setup
import subprocess
def get_cuda_version():
try:
nvcc_version = subprocess.check_output(["nvcc", "--version"]).decode("utf-8")
version_line = [line for line in nvcc_version.split("\n") if "release" in line][
0
]
cuda_version = version_line.split(" ")[-2].replace(",", "")
return "cu" + cuda_version.replace(".", "")
except (subprocess.CalledProcessError, FileNotFoundError):
return "no_cuda"
if __name__ == "__main__":
with open("README.md", "r") as f:
long_description = f.read()
fp = open("xfuser/__version__.py", "r").read()
version = eval(fp.strip().split()[-1])
setup(
name="xfuser",
author="xDiT Team",
author_email="fangjiarui123@gmail.com",
packages=find_packages(),
install_requires=[
"torch>=2.4.1",
"accelerate>=0.33.0",
"transformers>=4.39.1",
"sentencepiece>=0.1.99",
"beautifulsoup4>=4.12.3",
"distvae",
"yunchang>=0.6.0",
"einops",
"diffusers>=0.33.0",
"av", # For LTX-2 model
"peft", # For LTX-2 LoRA
],
extras_require={
"flash-attn": [
"flash-attn>=2.6.0", # NOTE: flash-attn is necessary if ring_degree > 1
],
"optimum-quanto": [
"optimum-quanto", # NOTE: optimum-quanto is necessary if use_fp8_t5_encoder is enabled
],
"torchao": [
"torchao", # NOTE: torchao is necessary if use_fp8_gemms is enabled
],
"flask": [
"flask", # NOTE: flask is necessary to run xDiT as an http service
],
"ray": [
"ray", # NOTE: ray is necessary if RayDiffusionPipeline is used
],
"opencv-python": [
"opencv-python-headless", # NOTE: opencv-python is necessary if ConsisIDPipeline is used
],
"test": [
"pytest",
"imageio",
"imageio-ffmpeg"
]
},
url="https://github.com/xdit-project/xDiT.",
description="A Scalable Inference Engine for Diffusion Transformers (DiTs) on Multiple Computing Devices",
long_description=long_description,
long_description_content_type="text/markdown",
version=version,
classifiers=[
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
],
include_package_data=True,
python_requires=">=3.10",
entry_points={
"console_scripts": [
"xdit=xfuser.cli:main",
],
},
)