Skip to content

Commit

Permalink
diffusers as optional during install (#383)
Browse files Browse the repository at this point in the history
  • Loading branch information
feifeibear authored Dec 5, 2024
1 parent 6096bd4 commit d8bf0a4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,18 +189,21 @@ Currently, if you need the parallel version of ComfyUI, please fill in this [app

### 1. Install from pip

We set diffusers as an optional installation requirement.
First, if you only use the USP interface, you don't need to install diffusers. Second, different models have different requirements for diffusers - for example, the latest models may need to be installed from the diffusers main branch.

```
pip install xfuser
# Or optionally, with flash_attn
pip install "xfuser[flash_attn]"
# Or optionally, with diffusers
pip install "xfuser[diffusers]"
```

### 2. Install from source

```
pip install -e .
# Or optionally, with flash_attn
pip install -e ".[flash_attn]"
# Or optionally, with diffusers
pip install -e ".[diffusers]"
```

Note that we use two self-maintained packages:
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def get_cuda_version():
install_requires=[
"torch>=2.1.0",
"accelerate>=0.33.0",
"diffusers@git+https://github.com/huggingface/diffusers", # NOTE: diffusers>=0.32.0.dev is necessary for CogVideoX and Flux
"transformers>=4.39.1",
"sentencepiece>=0.1.99",
"beautifulsoup4>=4.12.3",
Expand All @@ -39,12 +38,13 @@ def get_cuda_version():
"opencv-python",
"imageio",
"imageio-ffmpeg",
"optimum-quanto"
"optimum-quanto",
"flash_attn>=2.6.3"
],
extras_require={
"flash_attn": [
"flash_attn>=2.6.3",
],
"diffusers": [
"diffusers>=0.31.0", # NOTE: diffusers>=0.32.0.dev is necessary for CogVideoX and Flux
]
},
url="https://github.com/xdit-project/xDiT.",
description="xDiT: A Scalable Inference Engine for Diffusion Transformers (DiTs) on multi-GPU Clusters",
Expand Down

0 comments on commit d8bf0a4

Please sign in to comment.