欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 科技 > IT业 > 阿里wan2.1本地部署

阿里wan2.1本地部署

2025/3/20 17:21:33 来源:https://blog.csdn.net/wuai66/article/details/146300827  浏览:    关键词:阿里wan2.1本地部署

1.安装虚拟环境,

a) 安装python-3.11.8
b)在本地目录运行

-  python -m venv Wan2.1-env
-  cd Scripts
-  activate


2.下载代码
git clone https://github.com/Wan-Video/Wan2.1.git
cd Wan2.1


3.安装依赖库
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu124

4.安装flash

检查本地显卡GPU是否支持flash,如果不支持能安装成功,但是跑视频会失败。
pip install flash_attn-2.7.4.post1+cu124torch2.6.0cxx11abiFALSE-cp311-cp311-win_amd64.whl


5.安装依赖库
pip install -r requirements.txt


6.下载模型
pip install modelscope

modelscope download Wan-AI/Wan2.1-T2V-1.3B --local_dir ./Wan2.1-T2V-1.3B

7.生成视频
python generate.py  --task t2v-1.3B --size 832*480 --ckpt_dir ./Wan2.1-T2V-1.3B --offload_model True --t5_cpu --sample_shift 8 --sample_guide_scale 6 --prompt "两只迷你可爱小猫咪,背景在中式花园,黄白相间的毛发" --save_file  D:\wan2.1\out.mp4

 8.出现报错RuntimeError: FlashAttention only supports Ampere GPUs or newer.

说明显卡不支持。

 


 

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词