OpenImagingLab / FlashVSR_Plus
git clone https://github.com/OpenImagingLab/FlashVSR_Plus.git
This is the official repo of FlashVSR+: Efficient Video Super-Resolution via Hybrid Attention and Reward-Yield Distribution Matching.
—
stars, 24h
+131
stars, 7 days · #395
+131
stars, 30 days · #1,797
131
★ total · +131% this week
4
forks · 4 open issues
Star history starts 2026-10-20; the chart appears after the second daily snapshot.
LanguagePython
LicenseApache-2.0
Created2026-10-14 (6d ago)
Last push4d ago
Watchers3
OwnerOrganization
Links
README excerpt
⚡ FlashVSR+ Ruchang Yao 1,2 Shi Guo 1,† Junhao Zhuang 3 Mingde Yao 2,4 Xin Cai 1,2 Jiahao Zhan 2 Bin Fu 1 Xinyuan Chen 1 Yu Qiao 1 Tianfan Xue 1,2,4,† 1 Shanghai AI Lab 2 MMLAB CUHK 3 Tsinghua University 4 CPII under InnoHK † Corresponding authors. Installation · Model files · Run inference · Python API **Your star means a lot for us to develop this project!** :star: ## Overview **FlashVSR+** is an efficient one-step diffusion framework for high-quality video super-resolution, enabling **spatially untiled 4K inference on a single 24GB RTX 4090 GPU**. FlashVSR+ introduces two key innovations: - **Hybrid Attention:** Exploits spatial and temporal attention locality while retaining sparse global interactions, achieving up to **2× DiT acceleration** and **45% lower peak memory**. - **Reward-Yield Distribution Matching Distillation (RY-DMD):** Enables preference alignment with black-box rewards without differentiating through the reward model, improving perceptual quality and generalizing to text-to-image generation. We release the inference code, pretrained models, and training dataset to facilitate further research and applications. ## Highlights - **Three presets:** run Turbo, Base, or V1 through the same CLI and Python API. V1 uses the same inference configuration as Base with its own checkpoints. - **Large-motion support:** lower `--temporal-compression` from `4` (default) to `2` or `1` to better preserve motion details in videos with large motion. - **Long-video option:** a numeric `--decode-every` reads and writes video in segments; the default `auto` mode loads the full input. - **Attention backends:** use Block Sparse Attention, the included Triton operator, or PyTorch SDPA. ## Requirements - Linux - NVIDIA GPU with CUDA - Conda/Miniconda or Python `venv` - Python 3.10 - Input height and width must both be divisible by 128 The released inference pipeline is CUDA-only and does not support CPU inference. ## Installation ### 1. Create the environment #### Option A: Conda (recommended) [code] The editable installation exposes the `flashvsr_plus` Python package and keeps the `python -m inference.run_stream` command available. `--no-deps` is intentional. It prevents the package installation from modifying an existing PyTorch/CUDA environment. #### Option B: Python `venv` The project also works in a standard Python 3.10 virtual environment. It uses the host NVIDIA driver/CUDA runtime. [code] After either setup, activate the environment before installing an optional attention backend or running inference. ### 2. Install an attention backend FlashVSR+ supports two optimized sparse-attention backends: 1. **Block Sparse Attention (BSA)** from MIT Han Lab — recommended for NVIDIA data-center GPUs such as **A100, H100, and H200**, where the optimized CUDA operator is supported. 2. **FlashVSR Triton Attention** — our custom Triton implementation, compatible with a wide range of NVIDIA GPUs, including **RTX 4090, A100,