Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/en/Pipeline_Usage/Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ To keep the framework lightweight, the base installation only installs the neces

You can install multiple sets of dependencies with `pip install -e ".[audio,quant]"` or `pip install diffsynth[audio,quant]`.

EntroPack is an optional dependency. Before running quantization or low-VRAM examples that use `entropack_*` methods, install the matching backend as described in the [quantization guide](Quantization.md). For example, use `python -m pip install "entropack[cuda13]>=0.1.7"` for CUDA 13, or replace `cuda13` with `cuda12` for CUDA 12. This also applies to NVIDIA GPU users.

## GPU/NPU Support

### NVIDIA GPU
Expand Down Expand Up @@ -64,6 +66,14 @@ On Apple Silicon devices, no changes to the installation steps are needed. Howev
```
When using Ascend NPU, please replace `"cuda"` with `"npu"` in your Python code. For details, see [NPU Support](../Pipeline_Usage/GPU_support.md#ascend-npu).

### Moore Threads MUSA

Install matching `torch`, `torch_musa`, and `torchvision` builds from a MUSA image or vendor distribution first, then run `python -m pip install -e .` with that environment's Python. The base installation reuses installed packages that satisfy its requirements; do not add `--upgrade`.

`entropack>=0.1.7` requires `torch>=2.10`, so it is only included in `[quant]` / `[all]`. Do not install those extras in MUSA environments using torch 2.7.1 / 2.9.1. Quantization and low-VRAM examples using EntroPack still require a separately installed compatible backend; the base installation does not provide those features.

Reuse the audio and training packages validated in your image. If you need `[audio]` / `[training]`, protect the installed framework versions with an environment-specific constraints file and inspect the plan with `python -m pip install --dry-run -c <constraints.txt> -e ".[audio,training]"` first. In particular, audio dependencies must not replace the MUSA torch build.

## Other Installation Issues

If you encounter issues during installation, they may be caused by upstream dependencies. Please refer to the documentation for these packages:
Expand Down
10 changes: 10 additions & 0 deletions docs/zh/Pipeline_Usage/Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ pip install diffsynth

你可以使用命令 `pip install -e ".[audio,quant]"` 或 `pip install diffsynth[audio,quant]` 来安装多组依赖包。

EntroPack 现为可选依赖。运行使用 `entropack_*` 方法的量化或低显存示例前,请按[量化文档](Quantization.md)安装对应的后端;例如 CUDA 13 环境使用 `python -m pip install "entropack[cuda13]>=0.1.7"`,CUDA 12 环境使用 `cuda12`。这同样适用于 NVIDIA GPU 用户。

## GPU/NPU 支持

### NVIDIA GPU
Expand Down Expand Up @@ -65,6 +67,14 @@ pip install torch torchvision --index-url https://download.pytorch.org/whl/rocm6

使用 Ascend NPU 时,请将 Python 代码中的 `"cuda"` 改为 `"npu"`,详见[NPU 支持](../Pipeline_Usage/GPU_support.md#ascend-npu)。

### Moore Threads MUSA

先使用 MUSA 镜像或厂商提供的匹配版本安装 `torch`、`torch_musa` 和 `torchvision`,再使用该环境的 Python 执行 `python -m pip install -e .`。基础安装复用已满足要求的包;不要加 `--upgrade`。

`entropack>=0.1.7` 要求 `torch>=2.10`,因此仅放在 `[quant]` / `[all]` 中。已有 torch 2.7.1 / 2.9.1 的 MUSA 环境不要安装这两组依赖。使用 EntroPack 的量化和低显存示例仍需单独安装兼容的后端;基础安装不提供这些功能。

音频和训练依赖应沿用镜像中验证过的版本。需要补装 `[audio]` / `[training]` 时,使用针对当前环境的 constraints 文件保护已有框架版本,先通过 `python -m pip install --dry-run -c <constraints.txt> -e ".[audio,training]"` 检查安装计划;尤其不要让音频包替换 MUSA 版 torch。

## 其他安装问题

如果在安装过程中遇到问题,可能是由上游依赖包导致的,请参考这些包的文档:
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ dependencies = [
"pandas",
"accelerate",
"peft",
"entropack>=0.1.7",
]
classifiers = [
"Programming Language :: Python :: 3",
Expand All @@ -47,6 +46,8 @@ audio = [
quant = [
"bitsandbytes",
"comfy-kitchen",
# EntroPack requires torch>=2.10; keep it optional for preinstalled MUSA stacks.
"entropack>=0.1.7",
"torchao>=0.16"
]
training = [
Expand Down Expand Up @@ -91,6 +92,7 @@ all = [
"librosa",
"bitsandbytes",
"comfy-kitchen",
"entropack>=0.1.7",
"torchao>=0.16",
"deepspeed",
"tensorboard",
Expand Down