---
title: OSP-Next
canonical_url: "https://www.modelscope.cn/models/beihai123/OSP-Next"
md_url: "https://www.modelscope.cn/models/beihai123/OSP-Next.md"
repository: beihai123/OSP-Next
last_updated: 2026-05-28
license: apache-2.0
pipeline_tag: text-to-video-synthesis
tasks:
  - text-to-video-synthesis
base_model:
  - Wan-AI/Wan2.1-T2V-14B
base_model_relation: finetune
parameters: 28.6B
tensor_type:
  - F32
library_name:
  - lora
  - safetensors
  - pytorch
frameworks:
  - pytorch
language:
  - en
  - zh
domain:
  - cv
downloads: 11
stars: 0
tags:
  - text-to-video
  - video-generation
  - diffusion
  - flow-matching
  - sparse-attention
  - skiparse
  - sequence-parallel
  - mix-grpo
  - lora
  - hif8
  - quantization
  - npu
  - ascend
  - open-sora-plan
  - ospnext
---

# OSP-Next

> OSP-Next - beihai123 在 ModelScope 开源的模型。Efficient High-Quality Video Generation with Sparse Sequence Parallelism, HiF8 Quantization, and Reinforcement Learning

beihai123/OSP-Next 是 ModelScope 魔搭社区上的 28.6B 参数text-to-video-synthesis模型，采用 apache-2.0 许可，基于 Wan-AI/Wan2.1-T2V-14B 构建。

- **Repository**: beihai123/OSP-Next
- **License**: apache-2.0
- **Tasks**: text-to-video-synthesis
- **Parameters**: 28.6B
- **Base model**: Wan-AI/Wan2.1-T2V-14B
- **Tags**: text-to-video, video-generation, diffusion, flow-matching, sparse-attention, skiparse, sequence-parallel, mix-grpo, lora, hif8, quantization, npu, ascend, open-sora-plan, ospnext
- **Downloads**: 11
- **Stars**: 0
- **Last updated**: 2026-05-28

Source: https://www.modelscope.cn/models/beihai123/OSP-Next

---

<div align="center">

<img src="https://raw.githubusercontent.com/PKU-YuanGroup/OSP-Next/main/assets/logo.png" alt="OSP-Next" width="220">

### Efficient High-Quality Video Generation with Sparse Sequence Parallelism, HiF8 Quantization, and Reinforcement Learning

**Open-Sora Plan · 下一代 / Next Generation**

A scalable **sparse** text-to-video diffusion model, featuring **Skiparse-2D Attention**,
**Sparse Sequence Parallelism (SSP)**, **HiF8 quantization**, and
**Mix-GRPO + LoRA** RL post-training.

</div>

<h5 align="center">

[![arXiv](https://img.shields.io/badge/Arxiv-OSP--Next-b31b1b.svg?logo=arXiv)](https://arxiv.org/abs/2605.28691)
[![GitHub](https://img.shields.io/badge/GitHub-OSP--Next-181717.svg?logo=github)](https://github.com/PKU-YuanGroup/OSP-Next)

</h5>

---

## 🧠 模型简介 / Model Summary

OSP-Next 是一个 14B 参数的 **文本到视频扩散模型**，复用 **Wan 2.1** 的 T5 文本编码器
与 WAN VAE 作为前后端，并在扩散主干上引入了四项紧耦合的设计：

OSP-Next is a 14B-parameter **text-to-video diffusion** model that reuses
the **Wan 2.1** T5 text encoder / VAE and introduces four tightly co-designed
contributions:

| | 设计 / Component | 收益 / Why it matters |
|---|---|---|
| 🧩 | **Skiparse-2D Attention** — 沿 H/W 独立应用的固定规则 2D 稀疏注意力 | 质量接近 3D Full Attention，**原生兼容 FlashAttention 内核** |
| 🔗 | **Sparse Sequence Parallelism (SSP)** — 与 Skiparse-2D 协同设计的并行策略 | 跨 rank 通信量 **−75%**，每 block 通信轮次 **4→1** |
| 🪶 | **HiF8 Quantization** *(仅 NPU)* — 动态精度 8-bit（指数 / 尾数自适应分配） | 首次将 **8-bit 量化与稀疏微调联合** —— 在 Ascend 950PR 上单卡推理最高 **2.27× 加速**，VBench 仅 **−0.4 pt** |
| 🎯 | **Mix-GRPO + LoRA RL** — 稀疏模型上的 RL 后训练 | 首个面向 **稀疏视频扩散模型** 的 RL pipeline |

### 📊 端到端加速比 / End-to-end speed-up

相对 **Wan 2.1** 全注意力基线，在 **5 s · 81 帧** 视频上的实测加速比：

| 硬件 / Hardware | 720P (padded) | 768P (native) |
|---|---|---|
| ⚡ NVIDIA H200 (BF16 · FA3 · `torch.compile`) | **1.53×** / 1.42× (单卡 / 8 卡) | **1.64×** / 1.52× |
| 🟣 Ascend 950PR (BF16 · SDPA) | 1.27× (单卡) | 1.76× |
| 🪶 Ascend 950PR (HiF8 · 8-bit · SDPA) | **1.69×** | **2.27×** |

> 🏆 OSP-Next 取得 **VBench total 83.73%**（Wan 2.1 基线 83.69%）；
> OSP-Next-HiF8 在 8-bit 下仍保持 **83.29%**，仅下降 0.4 pt。
> 完整 benchmark、消融实验与可视化对比详见
> [论文 / paper](https://arxiv.org/abs/<ARXIV_ID>)。

---

## 📦 仓库内容 / What's in this repository

| 路径 / Path | 说明 / Description |
|---|---|
| `OSP-Next-14B/` | OSP-Next 14B BF16 扩散权重（FSDP `model.pt` + config） |
| `OSP-Next-HiF8-14B/` | HiF8 量化的 14B 权重（用于 NPU 推理） |
| `config.json` | OSP-Next 模型结构 metadata |

> ℹ️ OSP-Next 复用 **Wan 2.1 的 T5 (UMT5-XXL) 文本编码器**与 **WAN VAE**，
> 并未在本仓库二次托管，请前往
> [`Wan-AI/Wan2.1-T2V-14B`](https://modelscope.cn/models/Wan-AI/Wan2.1-T2V-14B)
> 下载这两个组件。

---

## 🚀 快速开始 / Quick Start

OSP-Next 是一套独立的训练 / 推理代码仓库（稀疏注意力、SSP 通信、HiF8 内核都在项目里），
不能像普通的 `transformers` / `diffusers` 模型那样一行 `from_pretrained` 加载。
标准使用流程如下：

```bash
# 1. 克隆代码仓库 / Clone the code repo
git clone https://github.com/PKU-YuanGroup/OSP-Next.git
cd OSP-Next
conda create -n ospnext python=3.10 -y && conda activate ospnext
pip install -e .

# 2a. 从本 ModelScope 仓库下载 OSP-Next 权重
modelscope download --model beihai123/OSP-Next \
    --local_dir ./checkpoints/osp_next_14b

# 2b. 下载 Wan 2.1 的 T5 文本编码器和 WAN VAE（OSP-Next 直接复用）
modelscope download --model Wan-AI/Wan2.1-T2V-14B \
    models_t5_umt5-xxl-enc-bf16.pth \
    Wan2.1_VAE.pth \
    --local_dir ./checkpoints/Wan2.1-T2V-14B
# T5 tokenizer（UMT5-XXL）也在同一个仓库内
modelscope download --model Wan-AI/Wan2.1-T2V-14B \
    --include "google/umt5-xxl/*" \
    --local_dir ./checkpoints/Wan2.1-T2V-14B

# 3. 打开推理 config，把三个下载好的路径填进去
$EDITOR configs/infer/gpu/osp_14b.yaml

# 4. 一键推理
bash scripts/infer/gpu/infer_osp_14b.sh
```

或者用 Python API 下载：

```python
from modelscope import snapshot_download

# OSP-Next 主权重
snapshot_download('beihai123/OSP-Next',
                  cache_dir='./checkpoints/osp_next_14b')
# Wan 2.1 的 T5 + VAE
snapshot_download('Wan-AI/Wan2.1-T2V-14B',
                  cache_dir='./checkpoints/Wan2.1-T2V-14B')
```

推理 YAML 中需要填的 4 个关键路径：

```yaml
model_config:
  pretrained_model_dir_or_checkpoint: "./checkpoints/osp_next_14b"
vae_config:
  vae_path: "./checkpoints/Wan2.1-T2V-14B/Wan2.1_VAE.pth"
text_encoder_config:
  checkpoint_path: "./checkpoints/Wan2.1-T2V-14B/models_t5_umt5-xxl-enc-bf16.pth"
  text_tokenizer_path: "./checkpoints/Wan2.1-T2V-14B/google/umt5-xxl/"
```

> 🟣 **使用昇腾 NPU 用户：** 请先按照代码仓库的
> [NPU 安装指南](https://github.com/PKU-YuanGroup/OSP-Next#-npu-ascend)
> 安装 CANN 8.5.0、`pip install -e .[npu]`、源码编译 `decord`，
> 然后改跑 `scripts/infer/npu/infer_osp_14b.sh` 即可。

### 🐍 编程加载 / Programmatic loading

也可以直接当成一个常规 `OSPNextModel` 加载：

```python
from ospnext.modules.osp_next import OSPNextModel

model = OSPNextModel.from_pretrained("./checkpoints/osp_next_14b")
model = model.to("cuda", dtype="bfloat16").eval()
```

完整的文本到视频 pipeline（T5 编码 → 扩散采样 → VAE 解码）请参考
[`infer/infer_osp.py`](https://github.com/PKU-YuanGroup/OSP-Next/blob/main/infer/infer_osp.py)。

---

## 🏋️ 训练与 RL 后训练 / Training & RL Post-Training

OSP-Next 同时支持：

- **SFT** 训练：`train/train_osp.py`
- **Mix-GRPO + LoRA RL** 后训练：`train/train_osp_RL.py`

两者共用同一套 FSDP2 + Sparse-SP 主干。RL pipeline 的几个要点：

- 仅训练 **LoRA**，base model 冻结，**checkpoint 只保存 LoRA 增量**（不重复存 base）。
- 同时保存当前 LoRA 与 **EMA-LoRA**（推理推荐用 EMA 版本）。
- 训练完成后，用
  [`merge_lora_weights.py`](https://github.com/PKU-YuanGroup/OSP-Next/blob/main/merge_lora_weights.py)
  把 LoRA 合并回 base，再用合并后的权重跑推理。
- 使用 [VideoAlign](https://github.com/KwaiVGI/VideoAlign) 作为多维度奖励模型。

完整的训练 / RL 配方、SP 切分表、调参建议都在
[代码仓库 README](https://github.com/PKU-YuanGroup/OSP-Next#%EF%B8%8F-training-pipeline)
中。

---

## 🧪 适用范围与局限 / Intended Use & Limitations

**适用 / Intended uses**

- **稀疏视频扩散** 相关研究：Skiparse-2D、Sparse Sequence Parallelism、
  稀疏 + 8-bit 联合量化、稀疏模型 RL 等方向。
- 非商业的创作与教学场景下的文本到视频生成。

**不适用 / Out of scope**

- 生成可识别的真实人物形象。
- 生成违法、欺骗性、有害、色情或侵犯版权的内容。

**已知局限 / Known limitations**

- 14B 参数量级，单卡推理至少需要 80 GB 显存级别的加速卡
  （H100 / H200 / A100 80GB / 昇腾 910B / 950PR）；多卡 SSP / FSDP2 推理脚本已经在仓库中提供。
- HiF8 权重针对 NPU 自研内核做了适配，NVIDIA GPU 上推荐先使用 BF16 主干。
- 多卡昇腾 950PR 的指标暂未发布，论文 / 本卡片中的 950PR 数据均为单卡结果。

---

## 📚 训练数据 / Training Data

OSP-Next 在 **Open-Sora-Plan** 系列的大规模文本-视频语料上训练，并叠加了我们的数据过滤
与重 caption 流程（详见论文）。我们尽力避免引入个人可识别信息，并对敏感内容进行了过滤。

RL 后训练使用的是 **纯文本 prompt 数据集**，由
[VideoAlign](https://github.com/KwaiVGI/VideoAlign) 作为奖励模型评分。

---

## 📝 引用 / Citation

如果 OSP-Next 对你的研究有帮助，欢迎引用：

```bibtex
@misc{ge2026ospnextefficienthighqualityvideo,
      title={OSP-Next: Efficient High-Quality Video Generation with Sparse Sequence Parallelism, HiF8 Quantization, and Reinforcement Learning}, 
      author={Yunyang Ge and Xianyi He and Zezhong Zhang and Bin Lin and Bin Zhu and Xinhua Cheng and Li Yuan},
      year={2026},
      eprint={2605.28691},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2605.28691}, 
}
```

本工作的相关基础：

```bibtex
@article{wan2025wan,
  title={Wan: Open and advanced large-scale video generative models},
  author={Wan, Team and Wang, Ang and Ai, Baole and Wen, Bin and Mao, Chaojie and Xie, Chen-Wei and Chen, Di and Yu, Feiwu and Zhao, Haiming and Yang, Jianxiao and others},
  journal={arXiv preprint arXiv:2503.20314},
  year={2025}
}

@article{lin2024open,
  title={Open-sora plan: Open-source large video generation model},
  author={Lin, Bin and Ge, Yunyang and Cheng, Xinhua and Li, Zongjian and Zhu, Bin and Wang, Shaodong and He, Xianyi and Ye, Yang and Yuan, Shenghai and Chen, Liuhan and others},
  journal={arXiv preprint arXiv:2412.00131},
  year={2024}
}

@article{li2025mixgrpo,
  title={Mixgrpo: Unlocking flow-based grpo efficiency with mixed ode-sde},
  author={Li, Junzhe and Cui, Yutao and Huang, Tao and Ma, Yinping and Fan, Chun and Cheng, Yiming and Yang, Miles and Zhong, Zhao and Bo, Liefeng},
  journal={arXiv preprint arXiv:2507.21802},
  year={2025}
}

```

---

## 🙏 致谢 / Acknowledgements

- 🌊 [**Wan**](https://github.com/Wan-Video/Wan2.1) — 提供 WAN-VAE 与 T5 backbone。
- 🎬 [**Open-Sora-Plan**](https://github.com/PKU-YuanGroup/Open-Sora-Plan) — 本项目所属的开源视频扩散生态。
- 🏅 [**VideoAlign**](https://github.com/KwaiVGI/VideoAlign) — RL 后训练使用的多维奖励模型。
- 🎯 [**Mix-GRPO**](https://arxiv.org/abs/2507.21802) — ODE-SDE 混合的流匹配 RL 算法。

---

## 📄 协议 / License

本模型按 **Apache 2.0** 许可发布，详见代码仓库的
[`LICENSE.txt`](https://github.com/PKU-YuanGroup/OSP-Next/blob/main/LICENSE.txt)。

被复用的 Wan 2.1 T5 / VAE 权重遵循其自身协议，详见上游仓库
[`Wan-AI/Wan2.1-T2V-14B`](https://modelscope.cn/models/Wan-AI/Wan2.1-T2V-14B)。
