mirror of
https://github.com/modelscope/DiffSynth-Studio.git
synced 2026-03-18 22:08:13 +00:00
Merge pull request #1167 from Feng0w0/install_env
Docs:Supplement NPU environment installation document
This commit is contained in:
@@ -30,11 +30,16 @@ pip install torch torchvision --index-url https://download.pytorch.org/whl/rocm6
|
|||||||
|
|
||||||
* **Ascend NPU**
|
* **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:
|
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.
|
||||||
|
|
||||||
```shell
|
2. Install from source
|
||||||
pip install torch-npu==2.1.0.post17
|
```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).
|
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).
|
||||||
|
|
||||||
|
|||||||
@@ -30,11 +30,16 @@ pip install torch torchvision --index-url https://download.pytorch.org/whl/rocm6
|
|||||||
|
|
||||||
* Ascend NPU
|
* Ascend NPU
|
||||||
|
|
||||||
Ascend NPU 通过 `torch-npu` 包提供支持,以 `2.1.0.post17` 版本(本文更新于 2025 年 12 月 15 日)为例,请运行以下命令
|
1. 通过官方文档安装[CANN](https://www.hiascend.com/document/detail/zh/canncommercial/83RC1/softwareinst/instg/instg_quick.html?Mode=PmIns&InstallType=local&OS=openEuler&Software=cannToolKit)
|
||||||
|
|
||||||
```shell
|
2. 从源码安装
|
||||||
pip install torch-npu==2.1.0.post17
|
```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)。
|
使用 Ascend NPU 时,请将 Python 代码中的 `"cuda"` 改为 `"npu"`,详见[NPU 支持](/docs/zh/Pipeline_Usage/GPU_support.md#ascend-npu)。
|
||||||
|
|
||||||
|
|||||||
@@ -36,5 +36,17 @@ classifiers = [
|
|||||||
where = ["./"]
|
where = ["./"]
|
||||||
include = ["diffsynth"]
|
include = ["diffsynth"]
|
||||||
|
|
||||||
|
[project.optional-dependencies]
|
||||||
|
npu_aarch64 = [
|
||||||
|
"torch==2.7.1",
|
||||||
|
"torch-npu==2.7.1",
|
||||||
|
"torchvision==0.22.1"
|
||||||
|
]
|
||||||
|
npu = [
|
||||||
|
"torch==2.7.1+cpu",
|
||||||
|
"torch-npu==2.7.1",
|
||||||
|
"torchvision==0.22.1+cpu"
|
||||||
|
]
|
||||||
|
|
||||||
[tool.setuptools]
|
[tool.setuptools]
|
||||||
include-package-data = true
|
include-package-data = true
|
||||||
|
|||||||
Reference in New Issue
Block a user