首页 / 安装部署 / RTX3080显卡本机部署通义万相教程,文本生成视频实战

RTX3080显卡本机部署通义万相教程,文本生成视频实战

2025-03-01 12:14:04安装部署 阅读 794
通义万相领先所有文生视频的大模型,开源之后吊打一众付费模型,本次小编本机部署1.3B、14B,并成功使用1.3B生成多个视频,效果不错。

通义万相1.3B文生视频效果图一

通义万相1.3B文生视频效果图二


通义万相本地部署

#基于conda创建python环境
conda create -n wanxiang_new python=3.10 -y
conda activate wanxiang_new

#克隆项目
git clone https://github.com/Wan-Video/Wan2.1.git
cd Wan2.1

#安装torch>=2.4
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
pip install F:\迅雷下载\torch-2.6.0+cu126-cp310-cp310-win_amd64.whl

# 安装cuda,非常重要,除非你本机已经有环境变量cuda_home
https://developer.nvidia.com/cuda-toolkit-archive
下载安装 cuda_12.1.0_531.14_windows.exe

# 安装ninja ,非常重要,加速编译,不然后边安装会卡很久完成不了
python -m pip install ninja -i https://pypi.tuna.tsinghua.edu.cn/simple

# 安装项目依赖
pip install -r requirements.txt

#下载模型
pip install modelscope
modelscope download Wan-AI/Wan2.1-T2V-14B --local_dir ./Wan2.1-T2V-14B
modelscope download Wan-AI/Wan2.1-T2V-1.3B --local_dir ./Wan2.1-T2V-1.3B

通义万相文生视频


windows生成视频,一定要加参数 --save_file ./123.mp4  ,不然会因为生成带*号文件名而无法保存视频报错。

生成视频的指令 480*832是 480p视频,1.3B模型可生成 。

rtx3080显卡,生成一次视频需要使用1个半小时。

python generate.py --task t2v-1.3B --size 480*832 --save_file ./123.mp4 --ckpt_dir ./Wan2.1-T2V-1.3B  --offload_model True --t5_cpu --sample_shift 8 --sample_guide_scale 6 --prompt "Summer beach vacation style, a white cat wearing sunglasses sits on a surfboard. The fluffy-furred feline gazes directly at the camera with a relaxed expression. Blurred beach scenery forms the background featuring crystal-clear waters, distant green hills, and a blue sky dotted with white clouds. The cat assumes a naturally relaxed posture, as if savoring the sea breeze and warm sunlight. A close-up shot highlights the feline's intricate details and the refreshing atmosphere of the seaside."

参数参考:


[-h] [--task {t2v-14B,t2v-1.3B,i2v-14B,t2i-14B}] [--size {720*1280,1280*720,480*832,832*480,1024*1024}] [--frame_num FRAME_NUM] [--ckpt_dir CKPT_DIR] [--offload_model OFFLOAD_MODEL] [--ulysses_size ULYSSES_SIZE]
                   [--ring_size RING_SIZE] [--t5_fsdp] [--t5_cpu] [--dit_fsdp] [--save_file SAVE_FILE] [--prompt PROMPT] [--use_prompt_extend] [--prompt_extend_method {dashscope,local_qwen}] [--prompt_extend_model PROMPT_EXTEND_MODEL]
                   [--prompt_extend_target_lang {ch,en}] [--base_seed BASE_SEED] [--image IMAGE] [--sample_solver {unipc,dpm++}] [--sample_steps SAMPLE_STEPS] [--sample_shift SAMPLE_SHIFT] [--sample_guide_scale SAMPLE_GUIDE_SCALE]     



本文《RTX3080显卡本机部署通义万相教程,文本生成视频实战》由爱思考吧 isres.com 分享,转载请注明出处。本文网址:https://www.isres.com/bushu/wan2-1.html

本站主要收集测评能够节省时间和提升效率的软件工具并分享使用与学习的过程和感受,任何情况下用户都需遵守所使用软件资源的相关协议。与《RTX3080显卡本机部署通义万相教程,文本生成视频实战》有关的本站文章及资源仅供个人学习交流使用,相关资源请下载后24小时内删除,请勿用于其它用途,因此产生的任何问题由您自行承担。

相关推荐

猜你喜欢