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
15 changes: 10 additions & 5 deletions docs/en/Pipeline_Usage/Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,16 @@ pip install torch torchvision --index-url https://download.pytorch.org/whl/rocm6

* **Ascend NPU**

Ascend NPU support is provided via the `torch-npu` package. Taking version `2.1.0.post17` (as of the article update date: December 15, 2025) as an example, run the following command:

```shell
pip install torch-npu==2.1.0.post17
```
1. Install [CANN](https://www.hiascend.com/document/detail/zh/canncommercial/83RC1/softwareinst/instg/instg_quick.html?Mode=PmIns&InstallType=local&OS=openEuler&Software=cannToolKit) through official documentation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The link to the CANN installation documentation points to a Chinese version of the page. Since this is the English documentation, it would be better to link to the English version for a better user experience.

Suggested change
1. Install [CANN](https://www.hiascend.com/document/detail/zh/canncommercial/83RC1/softwareinst/instg/instg_quick.html?Mode=PmIns&InstallType=local&OS=openEuler&Software=cannToolKit) through official documentation.
1. Install [CANN](https://www.hiascend.com/document/detail/en/canncommercial/83RC1/softwareinst/instg/instg_quick.html) through official documentation.


2. Install from source
```shell
git clone https://github.com/modelscope/DiffSynth-Studio.git
cd DiffSynth-Studio
# aarch64/ARM
pip install -e .[npu_aarch64] --extra-index-url "https://download.pytorch.org/whl/cpu"
# x86
pip install -e .[npu]

When using Ascend NPU, please replace `"cuda"` with `"npu"` in your Python code. For details, see [NPU Support](/docs/en/Pipeline_Usage/GPU_support.md#ascend-npu).

Expand Down
15 changes: 10 additions & 5 deletions docs/zh/Pipeline_Usage/Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,16 @@ pip install torch torchvision --index-url https://download.pytorch.org/whl/rocm6

* Ascend NPU

Ascend NPU 通过 `torch-npu` 包提供支持,以 `2.1.0.post17` 版本(本文更新于 2025 年 12 月 15 日)为例,请运行以下命令

```shell
pip install torch-npu==2.1.0.post17
```
1. 通过官方文档安装[CANN](https://www.hiascend.com/document/detail/zh/canncommercial/83RC1/softwareinst/instg/instg_quick.html?Mode=PmIns&InstallType=local&OS=openEuler&Software=cannToolKit)

2. 从源码安装
```shell
git clone https://github.com/modelscope/DiffSynth-Studio.git
cd DiffSynth-Studio
# aarch64/ARM
pip install -e .[npu_aarch64] --extra-index-url "https://download.pytorch.org/whl/cpu"
# x86
pip install -e .[npu]

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

Expand Down
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,17 @@ classifiers = [

[tool.setuptools.packages.find]

[project.optional-dependencies]
npu_aarch64 = [
"torch==2.7.1",
"torch-npu==2.7.1",
"torchvision==0.22.1"
Comment on lines +39 to +41
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The torch and torchvision packages for npu_aarch64 should specify the CPU-only versions by adding the +cpu suffix, similar to the npu (x86) dependencies. The installation command in Setup.md for aarch64 points to the CPU wheel index, which contains packages with this suffix (e.g., torch==2.7.1+cpu). Without the suffix, pip might fail to find the correct package or install a version from another index that is not compatible.

Suggested change
"torch==2.7.1",
"torch-npu==2.7.1",
"torchvision==0.22.1"
"torch==2.7.1+cpu",
"torch-npu==2.7.1",
"torchvision==0.22.1+cpu"

]
npu = [
"torch==2.7.1+cpu",
"torch-npu==2.7.1",
"torchvision==0.22.1+cpu"
]

[tool.setuptools]
include-package-data = true