/ Модель

Характеристики

Размер весов
69,2 ГБ
Лицензия
Apache 2.0
Библиотека
open-sora
Опубликована
4 мар 2025

Open-Sora-v2

Генерация видеоТекст → видео3 профессии

Open-Sora 2.0 — модель на 11 млрд параметров для создания видео по текстовому описанию или исходному изображению.

1 678скачиваний за 30 дней186лайковвеса обновлены15 мар 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Open-Sora 2.0 — модель генерации видео из текста, разработанная проектом Open-Sora. Она также поддерживает генерацию видео по текстовому запросу и исходному изображению. Модель на 11 млрд параметров рассчитана на разрешения 256 и 768 пикселей; длительность задаётся числом кадров, которое должно иметь вид 4k+1 и быть меньше 129. Для текстовой генерации доступен конвейер с предварительным созданием изображения с помощью Flux.

Модель предназначена для создания видеоконтента по описанию или анимирования изображения с управлением соотношением сторон и оценкой движения. Авторы сообщают, что результаты VBench сокращают разрыв с Sora по сравнению с Open-Sora 1.2, а предпочтения людей сопоставимы с HunyuanVideo 14B и Step-Video 30B. README указывает высокую потребность в GPU: для генерации 768×768 на одном H100/H800 приведены пиковое потребление памяти 60,3 ГБ и время 1656 секунд при 50 шагах. Репозиторий использует Apache-2.0; метаданные указывают форматы PyTorch и safetensors.

Сценарии применения

  • создание видеоролика по текстовому запросу
  • анимация исходного изображения по текстовому описанию
  • генерация видео с заданным соотношением сторон
  • создание видео с управляемой интенсивностью движения

Ограничения

Для генерации высокого разрешения требуются мощные GPU и значительный объём видеопамяти; в README приведены замеры до 60,3 ГБ для 768×768. Длительность ограничена менее чем 129 кадрами, причём допустимое число кадров имеет вид 4k+1.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Open-Sora: Democratizing Efficient Video Production for All

We design and implement Open-Sora, an initiative dedicated to efficiently producing high-quality video. We hope to make the model, tools and all details accessible to all. By embracing open-source principles, Open-Sora not only democratizes access to advanced video generation techniques, but also offers a streamlined and user-friendly platform that simplifies the complexities of video generation. With Open-Sora, our goal is to foster innovation, creativity, and inclusivity within the field of content creation.

Paper

Github: https://github.com/hpcaitech/Open-Sora

🔆 Reports

📍 Since Open-Sora is under active development, we remain different branchs for different versions. The latest version is main. Old versions include: v1.0, v1.1, v1.2, v1.3.

Quickstart

Installation

# create a virtual env and activate (conda as an example)
conda create -n opensora python=3.10
conda activate opensora

# download the repo
git clone https://github.com/hpcaitech/Open-Sora
cd Open-Sora

# Ensure torch >= 2.4.0
pip install -v . # for development mode, `pip install -v -e .`
pip install xformers==0.0.27.post2 --index-url https://download.pytorch.org/whl/cu121 # install xformers according to your cuda version
pip install flash-attn --no-build-isolation

Optionally, you can install flash attention 3 for faster speed.

git clone https://github.com/Dao-AILab/flash-attention # 4f0640d5
cd flash-attention/hopper
python setup.py install

Model Download

Our 11B model supports 256px and 768px resolution. Both T2V and I2V are supported by one model. 🤗 Huggingface 🤖 ModelScope.

Download from huggingface:

pip install "huggingface_hub[cli]"
huggingface-cli download hpcai-tech/Open-Sora-v2 --local-dir ./ckpts

Download from ModelScope:

pip install modelscope
modelscope download hpcai-tech/Open-Sora-v2 --local_dir ./ckpts

Text-to-Video Generation

Our model is optimized for image-to-video generation, but it can also be used for text-to-video generation. To generate high quality videos, with the help of flux text-to-image model, we build a text-to-image-to-video pipeline. For 256x256 resolution:

# Generate one given prompt
torchrun --nproc_per_node 1 --standalone scripts/diffusion/inference.py configs/diffusion/inference/t2i2v_256px.py --save-dir samples --prompt "raining, sea"

# Generation with csv
torchrun --nproc_per_node 1 --standalone scripts/diffusion/inference.py configs/diffusion/inference/t2i2v_256px.py --save-dir samples --dataset.data-path assets/texts/example.csv

For 768x768 resolution:

# One GPU
torchrun --nproc_per_node 1 --standalone scripts/diffusion/inference.py configs/diffusion/inference/t2i2v_768px.py --save-dir samples --prompt "raining, sea"

# Multi-GPU with colossalai sp
torchrun --nproc_per_node 8 --standalone scripts/diffusion/inference.py configs/diffusion/inference/t2i2v_768px.py --save-dir samples --prompt "raining, sea"

You can adjust the generation aspect ratio by --aspect_ratio and the generation length by --num_frames. Candidate values for aspect_ratio includes 16:9, 9:16, 1:1, 2.39:1. Candidate values for num_frames should be 4k+1 and less than 129.

You can also run direct text-to-video by:

# One GPU for 256px
torchrun --nproc_per_node 1 --standalone scripts/diffusion/inference.py configs/diffusion/inference/256px.py --prompt "raining, sea"
# Multi-GPU for 768px
torchrun --nproc_per_node 8 --standalone scripts/diffusion/inference.py configs/diffusion/inference/768px.py --prompt "raining, sea"

Image-to-Video Generation

Given a prompt and a reference image, you can generate a video with the following command:

# 256px
torchrun --nproc_per_node 1 --standalone scripts/diffusion/inference.py configs/diffusion/inference/256px.py --cond_type i2v_head --prompt "A plump pig wallows in a muddy pond on a rustic farm, its pink snout poking out as it snorts contentedly. The camera captures the pig's playful splashes, sending ripples through the water under the midday sun. Wooden fences and a red barn stand in the background, framed by rolling green hills. The pig's muddy coat glistens in the sunlight, showcasing the simple pleasures of its carefree life." --ref assets/texts/i2v.png

# 256px with csv
torchrun --nproc_per_node 1 --standalone scripts/diffusion/inference.py configs/diffusion/inference/256px.py --cond_type i2v_head --dataset.data-path assets/texts/i2v.csv

# Multi-GPU 768px
torchrun --nproc_per_node 8 --standalone scripts/diffusion/inference.py configs/diffusion/inference/768px.py --cond_type i2v_head --dataset.data-path assets/texts/i2v.csv

Advanced Usage

Motion Score

During training, we provide motion score into the text prompt. During inference, you can use the following command to generate videos with motion score (the default score is 4):

torchrun --nproc_per_node 1 --standalone scripts/diffusion/inference.py configs/diffusion/inference/t2i2v_256px.py --save-dir samples --prompt "raining, sea" --motion-score 4

We also provide a dynamic motion score evaluator. After setting your OpenAI API key, you can use the following command to evaluate the motion score of a video:

torchrun --nproc_per_node 1 --standalone scripts/diffusion/inference.py configs/diffusion/inference/t2i2v_256px.py --save-dir samples --prompt "raining, sea" --motion-score dynamic
Score147

Prompt Refine

We take advantage of ChatGPT to refine the prompt. You can use the following command to refine the prompt. The function is available for both text-to-video and image-to-video generation.

export OPENAI_API_KEY=sk-xxxx
torchrun --nproc_per_node 1 --standalone scripts/diffusion/inference.py configs/diffusion/inference/t2i2v_256px.py --save-dir samples --prompt "raining, sea" --refine-prompt True

Reproductivity

To make the results reproducible, you can set the random seed by:

torchrun --nproc_per_node 1 --standalone scripts/diffusion/inference.py configs/diffusion/inference/t2i2v_256px.py --save-dir samples --prompt "raining, sea" --sampling_option.seed 42 --seed 42

Use --num-sample k to generate k samples for each prompt.

Computational Efficiency

We test the computational efficiency of text-to-video on H100/H800 GPU. For 256x256, we use colossalai's tensor parallelism. For 768x768, we use colossalai's sequence parallelism. All use number of steps 50. The results are presented in the format: $\color{blue}{\text{Total time (s)}}/\color{red}{\text{peak GPU memory (GB)}}$

Resolution1x GPU2x GPUs4x GPUs8x GPUs
256x256$\color{blue}{60}/\color{red}{52.5}$$\color{blue}{40}/\color{red}{44.3}$$\color{blue}{34}/\color{red}{44.3}$
768x768$\color{blue}{1656}/\color{red}{60.3}$$\color{blue}{863}/\color{red}{48.3}$$\color{blue}{466}/\color{red}{44.3}$$\color{blue}{276}/\color{red}{44.3}$

Evaluation

On VBench, Open-Sora 2.0 significantly narrows the gap with OpenAI’s Sora, reducing it from 4.52% → 0.69% compared to Open-Sora 1.2.

VBench

Human preference results show our model is on par with HunyuanVideo 14B and Step-Video 30B.

Win Rate

Contribution

Thanks goes to these wonderful contributors:

If you wish to contribute to this project, please refer to the Contribution Guideline.

Acknowledgement

Here we only list a few of the projects. For other works and datasets, please refer to our report.

  • ColossalAI: A powerful large model parallel acceleration and optimization system.
  • DiT: Scalable Diffusion Models with Transformers.
  • OpenDiT: An acceleration for DiT training. We adopt valuable acceleration strategies for training progress from OpenDiT.
  • PixArt: An open-source DiT-based text-to-image model.
  • Flux: A powerful text-to-image generation model.
  • Latte: An attempt to efficiently train DiT for video.
  • HunyuanVideo: Open-Source text-to-video model.
  • StabilityAI VAE: A powerful image VAE model.
  • DC-AE: Deep Compression AutoEncoder for image compression.
  • CLIP: A powerful text-image embedding model.
  • T5: A powerful text encoder.
  • LLaVA: A powerful image captioning model based on Mistral-7B and Yi-34B.
  • PLLaVA: A powerful video captioning model.
  • MiraData: A large-scale video dataset with long durations and structured caption.

Citation

@software{opensora,
  author = {Zangwei Zheng and Xiangyu Peng and Tianji Yang and Chenhui Shen and Shenggui Li and Hongxin Liu and Yukun Zhou and Tianyi Li and Yang You},
  title = {Open-Sora: Democratizing Efficient Video Production for All},
  month = {March},
  year = {2024},
  url = {https://github.com/hpcaitech/Open-Sora}
}

Star History

Star History Chart

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · open-sora

Нельзя запустить

Генеративная модель выложена не в формате diffusers.

Ревизия весов
5dd4b85

0 моделей