Helios 项目介绍
Helios 的官方实现,已发布训练与推理代码及权重。
核验日期
核心信息
以下信息由程序从官方接口读取,不经模型改写。
- 许可证
- Apache-2.0
- 语言
- Python
- 维护方
- PKU-YuanGroup
- 核验日期
它是什么
本仓库是 Helios 的官方实现。作者已发布 Helios-Base、Helios-Mid 和 Helios-Distilled 的训练与推理代码及权重。HeliosBench 是面向实时长视频生成的专用基准。本项目采用 Apache 2.0 许可发布。
主要能力
Helios 支持多种上下文并行机制,包括 Ulysses Attention、Ring Attention、Unified Attention 和 Ulysses Anything Attention。
怎么上手
可以使用 huggingface-cli 下载模型。
也可以使用 modelscope-cli 下载模型。
# 0. Clone the repo
git clone --depth=1 https://github.com/PKU-YuanGroup/Helios.git
cd Helios
# 1. Create conda environment
conda create -n helios python=3.11.2
conda activate helios
# 2. Install PyTorch (adjust for your CUDA version)
# CUDA 12.6
pip install torch==2.10.0 torchvision==0.25.0 torchaudio==2.10.0 --index-url https://download.pytorch.org/whl/cu126
# CUDA 12.8
pip install torch==2.10.0 torchvision==0.25.0 torchaudio==2.10.0 --index-url https://download.pytorch.org/whl/cu128
# CUDA 13.0
pip install torch==2.10.0 torchvision==0.25.0 torchaudio==2.10.0 --index-url https://download.pytorch.org/whl/cu130
# 3. Install dependencies
bash install.shpip install "huggingface_hub[cli]"
huggingface-cli download BestWishYSH/Helios-Base --local-dir BestWishYSH/Helios-Base
huggingface-cli download BestWishYSH/Helios-Mid --local-dir BestWishYSH/Helios-Mid
huggingface-cli download BestWishYSH/Helios-Distilled --local-dir BestWishYSH/Helios-Distilledpip install modelscope
modelscope download BestWishYSH/Helios-Base --local_dir BestWishYSH/Helios-Base
modelscope download BestWishYSH/Helios-Mid --local_dir BestWishYSH/Helios-Mid
modelscope download BestWishYSH/Helios-Distilled --local_dir BestWishYSH/Helios-Distilledcd scripts/inference
# For Helios-Base
bash helios-base_t2v.sh
bash helios-base_i2v.sh
bash helios-base_v2v.sh
# For Helios-Mid
bash helios-mid_t2v.sh
bash helios-mid_i2v.sh
bash helios-mid_v2v.sh
# For Helios-Distilled
bash helios-distilled_t2v.sh
bash helios-distilled_i2v.sh
bash helios-distilled_v2v.sh
# For Interactive
# ⚠️ This feature is still under development — results may not always meet expectations
cd scripts/inference/experiment_interactivepip install git+https://github.com/huggingface/diffusers.gitpip install git+https://github.com/vllm-project/vllm-omni.git适合谁
Helios 采用自回归方式,每个分块生成 33 帧。项目建议将 num_frames 设为 33 的倍数。若提供的值不是倍数,会自动向上取整到最接近的 33 的倍数。
三个模型共享相同架构,其中 Helios-Mid 和 Helios-Distilled 使用更激进的多尺度采样流程以提高效率。Helios-Mid 是将 Helios-Base 蒸馏为 Helios-Distilled 的过程中生成的中间检查点,可能达不到预期质量。对于图生视频和视频生视频,由于训练基于文生视频,这两项功能可能略逊于文生视频。
实时生成性能不仅取决于 GPU,还取决于 CPU、内存、CUDA 驱动版本等。训练使用三阶段渐进式流程。第一阶段(Base)进行架构适配,应用 Unified History Injection、Easy Anti-Drifting 和 Multi-Term Memory Patchification,将双向预训练模型转换为自回归生成器。
第二阶段(Mid)以令牌压缩为目标,引入 Pyramid Unified Predictor Corrector,大幅减少噪声令牌数量,从而降低整体计算量。第三阶段(Distilled)应用 Adversarial Hierarchical Distillation,将采样步数从 50 降到 3,并且不再需要无分类器引导(CFG)。整个训练过程中,对所有与时间步相关的操作应用动态偏移,使噪声调度与潜变量大小相匹配。
CNAPS.AI 在其在线推理服务平台上提供了 Helios 的灵活工作流。训练后,可以使用一个脚本合并所有检查点,得到最终的 safetensors 文件。
来源
本页内容整理自以下官方来源,点击可核对原文。
- GitHub READMEhttps://github.com/PKU-YuanGroup/Helios抓取于
核验日期 ·
本页由 AI 依据上述官方来源整理,并经自动核对,未经本站实测。 发现错误?告诉我们。