Skip to main content

flashvideo is a lightweight framework for accelerating large video diffusion models.

Project description

FastVideo is an open-source framework for accelerating large video diffusion model.

Mochi Demo
Get 8X diffusion boost for Mochi with FastVideo

🤗 FastMochi | 🤗 FastHunyuan

FastVideo currently offers: (with more to come)

  • FastHunyuan and FastMochi: consistency distilled video diffusion models for 8x inference speedup.
  • First open video DiT distillation recipes based on PCM.
  • Scalable training with FSDP, sequence parallelism, and selective activation checkpointing, with near linear scaling to 64 GPUs.
  • Memory efficient finetuning with LoRA, precomputed latents, and precomputed text embeddings.

Change Log

  • 2024/12/17: FastVideo v0.1 is released.

🔧 Installation

The code is tested on Python 3.10.0, CUDA 12.1 and H100.

./env_setup.sh fastvideo

🚀 Inference

We recommend using a GPU with 80GB of memory. To run the inference, use the following command:

FastHunyuan

# Download the model weight
python scripts/huggingface/download_hf.py --repo_id=FastVideo/FastHunyuan --local_dir=data/FastHunyuan --repo_type=model
# CLI inference
sh scripts/inference/inference_hunyuan.sh

You can also inference FastHunyuan in the official Hunyuan github.

FastMochi

# Download the model weight
python scripts/huggingface/download_hf.py --repo_id=FastVideo/FastMochi-diffusers --local_dir=data/FastMochi-diffusers --repo_type=model
# CLI inference
bash scripts/inference/inference_mochi_sp.sh

Distillation

Please refer to the distillation guide.

Finetuning

Please refer to the finetuning guide.

Development Plan

Acknowledgement

We learned and reused code from the following projects: PCM, diffusers, and OpenSoraPlan.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flashvideo-0.1.0.tar.gz (138.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flashvideo-0.1.0-py3-none-any.whl (166.4 kB view details)

Uploaded Python 3

File details

Details for the file flashvideo-0.1.0.tar.gz.

File metadata

  • Download URL: flashvideo-0.1.0.tar.gz
  • Upload date:
  • Size: 138.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.13

File hashes

Hashes for flashvideo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 58d9e9073d1d96c74f6e8e80e63e36e43448179b82e5cf29d5da2a04dd83e1fc
MD5 d1fb544d297c2a5f29c28c26cbc7aac1
BLAKE2b-256 f215623f0680198584fe49148c66a4ce81553a48ac223f05bce88e6d3b5faf35

See more details on using hashes here.

File details

Details for the file flashvideo-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: flashvideo-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 166.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.13

File hashes

Hashes for flashvideo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38d7960aa31459ad5a535867e251b129bd650728fc941a1688bf7bb81b833ed1
MD5 005760044cc0d0235818e7fca636b590
BLAKE2b-256 f335e88d4b32fbf79a63c82a5116a4d58c1d16cba657456e860820df16e96973

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page