| 类别 | 说明 |
|---|---|
| 服务器 | 800T A2 (376T) |
| 驱动及框架 | HDK 25.2.3、CANN 8.2.RC2、MindIE 2.1.RC2 |
| 依赖软件版本 | torch-2.5.1、torch_npu-2.5.1.post1 |
| 其他 | python 3.11.x |
2.1.RC2-800I-A2-py311-openeuler24.03-lts 参考链接: https://www.hiascend.com/developer/ascendhub/detail/af85b724a7e5469ebd7ea13c3439d48f
git clone https://modelers.cn/MindIE/Wan2.2.gitpip install diffusers==0.35.1
pip install -r requirement# 若环境镜像中没有gcc、g++,请用户自行安装
yum install gcc
yum install g++
# 导入头文件路径
export CPLUS_INCLUDE_PATH=/usr/include/c++/12/:/usr/include/c++/12/aarch64-openEuler-linux/:$CPLUS_INCLUDE_PATHpip install torch==2.5.1
pip install torch-npu==2.5.1.post1由于mindie-sd及torch_atb模块官方发布版本基于torch-2.1.0构建,因此需要对这两个模块重新编译构建。
mindie-sd:
git clone https://gitcode.com/Ascend/MindIE-SD.git && cd MindIE-SD
python setup.py bdist_wheel
cd dist
pip install mindiesd-*.whl --force-reinstalltorch-atb:
pip install torch_atb-0.0.1-cp311-none-any.whl --force-reinstall其中model_base设置为权重路径
export PYTORCH_NPU_ALLOC_CONF='expandable_segments:True'
export TASK_QUEUE_ENABLE=2
export CPU_AFFINITY_CONF=1
export TOKENIZERS_PARALLELISM=false
torchrun --nproc_per_node=8 --master_port=23459 generate.py \
--task t2v-A14B \
--ckpt_dir ${model_base} \
--size 1280*720 \
--frame_num 81 \
--sample_steps 40 \
--dit_fsdp \
--t5_fsdp \
--cfg_size 2 \
--ulysses_size 4 \
--vae_parallel \
--prompt "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage." \
--use_rainfusion \
--sparsity 0.64 \
--sparse_start_step 15 \
--base_seed 0