docs: add offline model download section to README

This commit is contained in:
yumoqing 2026-06-14 16:40:58 +08:00
parent 203eca5953
commit 7e9be54056

View File

@ -20,6 +20,65 @@ HTTP Request → ahserver (port 8079) → submit.dspy → longtasks.submit_task(
- **模型常驻**: 首次任务加载 Wan2.2 模型,后续任务复用,无需重复加载
- **异步队列**: longtasks 通过 Redis 管理任务队列,支持失败重试
## 模型下载(离线部署)
Wan2.2-TI2V-5B 是 HuggingFace 模型,需要先下载再部署。
### 方法1: huggingface-cli推荐
```bash
# 安装 huggingface-cli
pip install huggingface_hub
# 下载模型到指定目录
huggingface-cli download Wan-AI/Wan2.2-TI2V-5B \
--local-dir /data/ymq/models/Wan-AI/Wan2.2-TI2V-5B \
--local-dir-use-symlinks False
```
**下载大小**: ~10GB
**下载时间**: 取决于网络速度约10-30分钟
### 方法2: git-lfs
```bash
# 安装 git-lfs
git lfs install
# 克隆模型仓库
cd /data/ymq/models
git clone https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B
```
### 方法3: wget/curl单文件
如果只需要特定文件,可以直接下载:
```bash
cd /data/ymq/models/Wan-AI/Wan2.2-TI2V-5B
# 下载模型文件(示例)
wget https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B/resolve/main/diffusion_pytorch_model-00001-of-00003.safetensors
wget https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B/resolve/main/diffusion_pytorch_model-00002-of-00003.safetensors
wget https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B/resolve/main/diffusion_pytorch_model-00003-of-00003.safetensors
wget https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B/resolve/main/Wan2.2_VAE.pth
wget https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B/resolve/main/config.json
```
### 验证下载
```bash
ls -lh /data/ymq/models/Wan-AI/Wan2.2-TI2V-5B/
# 应该看到 3个 .safetensors 文件每个约3.3GB+ VAE + 配置文件
```
### 模型来源
- **HuggingFace**: https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B
- **License**: Apache 2.0
- **Paper**: Wan: Open and Advanced Large-Scale Video Generative Models
## API 接口
### 1. 提交视频生成任务