在 NVIDIA-Workbench(WSL2-Ubuntu 22.04) 中部署 SkyReels-V2 昆仑万维电影生成模型 —— 逐命令逐输出,附模型缓存映射技巧
在 NVIDIA-Workbench(WSL2-Ubuntu 22.04) 中部署 SkyReels-V2 昆仑万维电影生成模型 —— 逐命令逐输出,附模型缓存映射技巧
在 NVIDIA-Workbench(WSL2-Ubuntu 22.04) 中部署 SkyReels-V2 昆仑万维电影生成模型
——逐命令逐输出,附模型缓存映射技巧
适用场景
Windows 11 + WSL2 + NVIDIA-Workbench(纯净 Ubuntu 22.04 镜像)RAM:可用内存 ≥ 32GB+ (测试机 RAM ≈128GB)
GPU:RTX 30/40 系列,显存(VRAM) ≥ 24 GB +(1.3B -540P 模型推理)ROM:空闲磁盘空间 ≥ 500GB +
该配置下生成 10 S 视频速度较慢,其他配置的请酌情尝试~

Window 直接部署版参考:
由于官方仓库更新,效果已不理想,部分关键库仍难兼容且代码修改、修复的地方较多,建议直接避坑用 Linux 或 WSL-Linux 发行版部署!
请注意:用 Linux 或 WSL-Linux 发行版部署则需要注意模型缓存下载比较占用空间的问题(单模型 ≈150GB + ,下载使用更多的模型就意味着更多的空间占用),本文记述过程章节中引用的链接中有 WSL 模型缓存的解决方案。如果是纯 Linux 系统部署,请提前规划路径及空间!
修复笔记:【实用指南】解决 SkyReels-V2 报错:ModuleNotFoundError: No module named ‘moviepy.editor’
0 前置条件
请先完成 Workbench 深度学习环境(CUDA 12.9 + cuDNN 9 + PyTorch 2.5+):
👉 NVIDIA-Workbench 环境搭建教程
在 WSL2-NVIDIA-Workbench 中安装Anaconda、CUDA 13.0、cuDNN 9.12 及 PyTorch(含完整环境验证)-CSDN博客
1 Clone 仓库
Windows 本地项目储存位置:
git clone https://github.com/SkyworkAI/SkyReels-V2
cd SkyReels-V2
2 创建 Conda 环境
NVIDIA-Workbench 终端内:
conda create --name skyreels python=3.10
conda activate skyreels
3 替换 requirements.txt
原 requirements.txt 文件缺失较多依赖项,以下是部署成功后导出的 requirements.txt
accelerate==1.6.0
aiohappyeyeballs==2.6.1
aiohttp==3.12.15
aiosignal==1.4.0
async-timeout==5.0.1
attrs==25.3.0
beautifulsoup4==4.13.5
certifi==2025.8.3
cffi==1.17.1
charset-normalizer==3.4.3
cryptography==45.0.6
dashscope==1.24.2
decorator==4.4.2
decord==0.6.0
diffusers==0.35.1
DistVAE==0.0.0b5
easydict==1.13
einops==0.8.1
filelock==3.19.1
# flash_attn==2.8.3
frozenlist==1.7.0
fsspec==2025.7.0
ftfy==6.3.1
hf-xet==1.1.9
huggingface-hub==0.34.4
idna==3.10
imageio==2.37.0
imageio-ffmpeg==0.6.0
importlib_metadata==8.7.0
Jinja2==3.1.6
MarkupSafe==3.0.2
moviepy==1.0.3
mpmath==1.3.0
multidict==6.6.4
networkx==3.4.2
numpy==1.26.4
nvidia-cublas-cu12==12.4.5.8
nvidia-cuda-cupti-cu12==12.4.127
nvidia-cuda-nvrtc-cu12==12.4.127
nvidia-cuda-runtime-cu12==12.4.127
nvidia-cudnn-cu12==9.1.0.70
nvidia-cufft-cu12==11.2.1.3
nvidia-curand-cu12==10.3.5.147
nvidia-cusolver-cu12==11.6.1.9
nvidia-cusparse-cu12==12.3.1.170
nvidia-nccl-cu12==2.21.5
nvidia-nvjitlink-cu12==12.4.127
nvidia-nvtx-cu12==12.4.127
opencv-python==4.10.0.84
packaging==25.0
pillow==11.3.0
proglog==0.1.12
propcache==0.3.2
psutil==7.0.0
pycparser==2.22
python-dotenv==1.1.1
PyYAML==6.0.2
regex==2025.7.34
requests==2.32.5
safetensors==0.6.2
sentencepiece==0.2.1
soupsieve==2.8
sympy==1.13.1
tokenizers==0.21.1
torch==2.5.1
torchvision==0.20.1
tqdm==4.67.1
transformers==4.49.0
triton==3.1.0
typing_extensions==4.15.0
urllib3==2.5.0
wcwidth==0.2.13
websocket-client==1.8.0
xfuser==0.4.4
yarl==1.20.1
yunchang==0.6.3.post1
zipp==3.23.0
4 安装依赖(分两步)
pip install -r requirements.txt # 安装 PyTorch 等
pip install flash_attn==2.8.3 # 后装 Flash-Attn 避免失败
5 模型缓存映射到 Windows 盘符
Workbench 默认缓存路径在 WSL 虚拟磁盘,容量有限。
按下方教程把 ~/.cache/huggingface 映射到 Windows 本地目录(如 F:\HFCache):
👉 将 Hugging Face 缓存迁出 WSL
告别 磁盘爆红!WSL2 部署大模型 将 Hugging Face / ModelScope 缓存迁移到 Windows 指定盘符(可视化)指南-CSDN博客


6 运行首次推理(自动下载 148 GB+ 模型)
model_id=Skywork/SkyReels-V2-DF-14B-540P
python3 generate_video_df.py \
--model_id ${model_id} \
--resolution 540P \
--ar_step 0 \
--base_num_frames 97 \
--num_frames 257 \
--overlap_history 17 \
--prompt "A graceful white swan with a curved neck and delicate feathers swimming in a serene lake at dawn, its reflection perfectly mirrored in the still water as mist rises from the surface, with the swan occasionally dipping its head into the water to feed." \
--addnoise_condition 20 \
--offload \
--teacache \
--use_ret_steps \
--teacache_thresh 0.3
7 终端输出(节选)
(skyreels) workbench@AI:/mnt/f/PythonProjects/SkyReels-V2$ model_id=Skywork/SkyReels-V2-DF-14B-540P
# synchronous inference
python3 generate_video_df.py \
--model_id ${model_id} \
--resolution 540P \
--ar_step 0 \
--base_num_frames 97 \
--num_frames 257 \
--overlap_history 17 \
--prompt "A graceful white swan with a curved neck and delicate feathers swimming in a serene lake at dawn, its reflection perfectly mirrored in the still water as mist rises from the surface, with the swan occasionally dipping its head into the water to feed." \
--addnoise_condition 20 \
--offload \
--teacache \
--use_ret_steps \
--teacache_thresh 0.3
special_tokens_map.json: 6.62kB [00:00, 38.1MB/s] | 0/25 [00:00<?, ?it/s]
LICENSE: 3.18kB [00:00, 21.5MB/s] | 0.00/508M [00:00<?, ?B/s]
logo2.png: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 23.5k/23.5k [00:00<00:00, 96.9MB/s]
.gitattributes: 2.29kB [00:00, 24.5MB/s]B/s]
main_pipeline.jpg: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 183k/183k [00:00<00:00, 864kB/s]
config.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 308/308 [00:00<00:00, 3.54MB/s]
README.md: 34.9kB [00:00, 105MB/s] | 10.5M/508M [00:00<00:21, 22.8MB/s]
spiece.model: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.55M/4.55M [00:00<00:00, 11.4MB/s]
tokenizer_config.json: 61.7kB [00:00, 221MB/s] | 31.5M/508M [00:01<00:16, 29.6MB/s]
tokenizer.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 16.8M/16.8M [00:01<00:00, 13.5MB/s]
Wan2.1_VAE.pth: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 508M/508M [00:55<00:00, 9.14MB/s]
model-00001-of-00012.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.86G/4.86G [09:30<00:00, 8.52MB/s]
model-00002-of-00012.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.92G/4.92G [09:36<00:00, 8.54MB/s]
model-00005-of-00012.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.92G/4.92G [09:37<00:00, 8.52MB/s]
model-00003-of-00012.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.92G/4.92G [09:38<00:00, 8.51MB/s]
model-00006-of-00012.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.92G/4.92G [09:37<00:00, 8.51MB/s]
model-00004-of-00012.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.92G/4.92G [09:38<00:00, 8.50MB/s]
model.safetensors.index.json: 77.1kB [00:00, 260MB/s]███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▊ | 15/25 [09:41<05:47, 34.74s/it]
model-00007-of-00012.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.92G/4.92G [09:38<00:00, 8.50MB/s]
model-00008-of-00012.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.92G/4.92G [09:24<00:00, 8.72MB/s]
model-00012-of-00012.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.10G/3.10G [03:54<00:00, 13.2MB/s]
model-00009-of-00012.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.92G/4.92G [05:45<00:00, 14.2MB/s]
model-00010-of-00012.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.92G/4.92G [05:41<00:00, 14.4MB/s]
model-00011-of-00012.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.92G/4.92G [05:41<00:00, 14.4MB/s]
models_t5_umt5-xxl-enc-bf16.pth: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11.4G/11.4G [08:43<00:00, 21.7MB/s]
Fetching 25 files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 25/25 [18:25<00:00, 44.22s/it]
model_id: /home/workbench/.cache/huggingface/hub/models--Skywork--SkyReels-V2-DF-14B-540P/snapshots/46ed789be08760a3e68d96bc78ddfd8c70be4eee███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11.4G/11.4G [08:43<00:00, 35.4MB/s]
using teacache-00012.safetensors: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▉| 4.92G/4.92G [05:41<00:00, 20.0MB/s]
prompt:A graceful white swan with a curved neck and delicate feathers swimming in a serene lake at dawn, its reflection perfectly mirrored in the still water as mist rises from the surface, with the swan occasionally dipping its head into the water to feed.███████▍ | 4.87G/4.92G [05:39<00:02, 18.1MB/s]
guidance_scale:6.012.safetensors: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▉| 4.92G/4.92G [05:41<00:00, 28.3MB/s]
WARNING:py.warnings:/mnt/f/PythonProjects/SkyReels-V2/generate_video_df.py:196: FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.
with torch.cuda.amp.autocast(dtype=pipe.transformer.dtype), torch.no_grad():
n_iter:3
10%||||||||||

8 完成
当看到进度条持续前进且显存占用稳定,即表示 SkyReels-V2 已在 NVIDIA-Workbench 中部署成功(生成速度与显卡及配置成正比),后续可批量生成视频或二次开发。
火山引擎开发者社区是火山引擎打造的AI技术生态平台,聚焦Agent与大模型开发,提供豆包系列模型(图像/视频/视觉)、智能分析与会话工具,并配套评测集、动手实验室及行业案例库。社区通过技术沙龙、挑战赛等活动促进开发者成长,新用户可领50万Tokens权益,助力构建智能应用。
更多推荐
所有评论(0)