FlashVSR

OpenImagingLabApache-2.0活跃维护

面向流式视频超分的一步扩散框架,用局部约束稀疏注意力和微型条件解码器把扩散超分做到实时,适合直播、视频通话等低延迟场景。

[CVPR 2026] Towards Real-Time Diffusion-Based Streaming Video Super-Resolution — An efficient one-step diffusion framework for streaming VSR with locality-constrained sparse attention and a tiny conditional decoder.

暂无版本1,971star +5 / 7 天165fork同步于 2026-11-10 05:51 UTC

怎么上手

由 README 提炼,执行前请确认
conda create -n flashvsr python=3.11.13
conda activate flashvsr
pip install -e .
pip install -r requirements.txt
git clone https://github.com/mit-han-lab/Block-Sparse-Attention
cd Block-Sparse-Attention
pip install packaging
pip install ninja
python setup.py install
硬件要求按 README 说明

README 称 768×1408 视频在单张 A100 上约 17 FPS;Block-Sparse Attention 后端在 NVIDIA A100/A800(Ampere)上验证且加速理想,H200(Hopper)可运行但加速有限,RTX 40/50 系与 H800 的兼容性和性能未知。README 未给出具体显存数值,也未说明能否纯 CPU 运行。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

一步扩散的实时流式视频超分框架,把扩散 VSR 做到可实用

面向流式视频超分的一步扩散框架,用局部约束稀疏注意力和微型条件解码器把扩散超分做到实时,适合直播、视频通话等低延迟场景。

核心能力

  • 单步扩散流式推理,768×1408 视频在单卡 A100 上约 17 FPS
  • 用局部约束稀疏注意力(LCSA)削减冗余计算
  • 三阶段蒸馏流程支持流式视频超分训练
  • 微型条件解码器加速重建且不牺牲画质
  • 支持长视频推理,可扩展至超高分辨率

容易踩的坑

必须单独编译安装 Block-Sparse Attention 后端,编译时并行 ninja 任务多容易 OOM;模型权重需用 Git LFS 从 Hugging Face 克隆到 examples/WanVSR 下,脚本按文件夹名自动加载;项目主要针对 4× 超分优化,其他倍率效果和稳定性不保证;部分第三方 ComfyUI 实现缺少 LCSA 模块,画质会明显下降。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    ⚡ FlashVSR

    Towards Real-Time Diffusion-Based Streaming Video Super-Resolution

    Authors: Junhao Zhuang, Shi Guo, Xin Cai, Xiaohui Li, Yihao Liu, Chun Yuan, Tianfan Xue

           

    Your star means a lot for us to develop this project! :star:


    🌟 Abstract

    Diffusion models have recently advanced video restoration, but applying them to real-world video super-resolution (VSR) remains challenging due to high latency, prohibitive computation, and poor generalization to ultra-high resolutions. Our goal in this work is to make diffusion-based VSR practical by achieving efficiency, scalability, and real-time performance. To this end, we propose FlashVSR, the first diffusion-based one-step streaming framework towards real-time VSR. FlashVSR runs at ∼17 FPS for 768 × 1408 videos on a single A100 GPU by combining three complementary innovations: (i) a train-friendly three-stage distillation pipeline that enables streaming super-resolution, (ii) locality-constrained sparse attention that cuts redundant computation while bridging the train–test resolution gap, and (iii) a tiny conditional decoder that accelerates reconstruction without sacrificing quality. To support large-scale training, we also construct VSR-120K, a new dataset with 120k videos and 180k images. Extensive experiments show that FlashVSR scales reliably to ultra-high resolutions and achieves state-of-the-art performance with up to ∼12× speedup over prior one-step diffusion VSR models.


    📰 News

    • Oct 2026 — 🎉 FlashVSR+ released! Our new work introduces Hybrid Attention for efficient one-step VSR and Reward-Yield DMD (RY-DMD) for reward-aware post-training with black-box rewards. Inference code, pretrained models, and training data are now available. [Project Page] [Paper]
    • Nov 2025 — 🎉 FlashVSR v1.1 released: enhanced stability + fidelity
    • Oct 2025 — FlashVSR v1 (initial release): Inference code and model weights are available now! 🎉
    • Bug Fix (October 21, 2025): Fixed local_attention_mask update logic to prevent artifacts when switching between different aspect ratios during continuous inference.
    • Coming Soon: Dataset release (VSR-120K) for large-scale training.

    🌐 Community Integrations

    Thanks to the community for the fast adoption of FlashVSR! Below are some third-party integrations:

    ComfyUI Support

    Cloud / API Deployments
    (These third-party services offer ready-to-use online inference, making it easy to try FlashVSR without any setup or GPU requirements. However, it’s unclear whether they run v1 or v1.1 or whether the full pipeline is implemented, so results may differ from the official version. 🤷‍♂️ For the most accurate and complete reproduction, we recommend using the official repository when possible.)


    📢 Important Quality Note (ComfyUI & other third-party implementations)

    First of all, huge thanks to the community for the fast adoption, feedback, and contributions to FlashVSR! 🙌
    During community testing, we noticed that some third-party implementations of FlashVSR (e.g. early ComfyUI versions) do not include our Locality-Constrained Sparse Attention (LCSA) module and instead fall back to dense attention. This may lead to noticeable quality degradation, especially at higher resolutions.
    Community discussion: https://github.com/kijai/ComfyUI-WanVideoWrapper/issues/1441

    Below is a comparison example provided by a community member:

    Fig.1 – LR Input VideoFig.2 – 3rd-party (no LCSA)Fig.3 – Official FlashVSR

    ✅ The official FlashVSR pipeline (this repository):

    • Better preserves fine structures and details
    • Effectively avoids texture aliasing and visual artifacts

    Thanks again to the community for actively testing and helping improve FlashVSR together! 🚀


    📋 TODO

    • ✅ Release inference code and model weights
    • ⬜ Release dataset (VSR-120K)

    🚀 Getting Started

    Follow these steps to set up and run FlashVSR on your local machine:

    ⚠️ Note: This project is primarily designed and optimized for 4× video super-resolution.
    We strongly recommend using the 4× SR setting to achieve better results and stability. ✅

    1️⃣ Clone the Repository
    git clone https://github.com/OpenImagingLab/FlashVSR
    cd FlashVSR
    
    2️⃣ Set Up the Python Environment

    Create and activate the environment (Python 3.11.13):

    conda create -n flashvsr python=3.11.13
    conda activate flashvsr
    

    Install project dependencies:

    pip install -e .
    pip install -r requirements.txt
    
    3️⃣ Install Block-Sparse Attention (Required)

    FlashVSR relies on the Block-Sparse Attention backend to enable flexible and dynamic attention masking for efficient inference.

    ⚠️ Note:

    • The Block-Sparse Attention build process can be memory-intensive, especially when compiling in parallel with multiple ninja jobs. It is recommended to keep sufficient memory available during compilation to avoid OOM errors. Once the build is complete, runtime memory usage is stable and not an issue.
    • Based on our testing, the Block-Sparse Attention backend works correctly on NVIDIA A100 and A800 (Ampere) with ideal acceleration performance, and it also runs correctly on H200 (Hopper) but the acceleration is limited due to hardware scheduling differences and sparse kernel behavior. Compatibility and performance on other GPUs (e.g., RTX 40/50 series or H800) are currently unknown. For more details, please refer to the official documentation: https://github.com/mit-han-lab/Block-Sparse-Attention
    # ✅ Recommended: clone and install in a separate clean folder (outside the FlashVSR repo)
    git clone https://github.com/mit-han-lab/Block-Sparse-Attention
    cd Block-Sparse-Attention
    pip install packaging
    pip install ninja
    python setup.py install
    
    4️⃣ Download Model Weights from Hugging Face

    FlashVSR provides both v1 and v1.1 model weights on Hugging Face (via Git LFS).
    Please install Git LFS first:

    # From the repo root
    cd examples/WanVSR
    
    # Install Git LFS (once per machine)
    git lfs install
    
    # Clone v1 (original) or v1.1 (recommended)
    git lfs clone https://huggingface.co/JunhaoZhuang/FlashVSR          # v1
    # or
    git lfs clone https://huggingface.co/JunhaoZhuang/FlashVSR-v1.1      # v1.1
    

    After cloning, you should have one of the following folders:

    ./examples/WanVSR/FlashVSR/          # v1
    ./examples/WanVSR/FlashVSR-v1.1/     # v1.1
    │
    ├── LQ_proj_in.ckpt
    ├── TCDecoder.ckpt
    ├── Wan2.1_VAE.pth
    ├── diffusion_pytorch_model_streaming_dmd.safetensors
    └── README.md
    

    Inference scripts automatically load weights from the corresponding folder.


    5️⃣ Run Inference
    # From the repo root
    cd examples/WanVSR
    
    # v1 (original)
    python infer_flashvsr_full.py
    # or
    python infer_flashvsr_tiny.py
    # or
    python infer_flashvsr_tiny_long_video.py
    
    # v1.1 (recommended)
    python infer_flashvsr_v1.1_full.py
    # or
    python infer_flashvsr_v1.1_tiny.py
    # or
    python infer_flashvsr_v1.1_tiny_long_video.py
    

    🛠️ Method

    The overview of FlashVSR. This framework features:

    • Three-Stage Distillation Pipeline for streaming VSR training.
    • Locality-Constrained Sparse Attention to cut redundant computation and bridge the train–test resolution gap.
    • Tiny Conditional Decoder for efficient, high-quality reconstruction.
    • VSR-120K Dataset consisting of 120k videos and 180k images, supports joint training on both images and videos.

    🤗 Feedback & Support

    We welcome feedback and issues. Thank you for trying FlashVSR!


    📄 Acknowledgments

    We gratefully acknowledge the following open-source projects:


    📞 Contact


    📜 Citation

    @article{zhuang2025flashvsr,
      title={FlashVSR: Towards Real-Time Diffusion-Based Streaming Video Super-Resolution},
      author={Zhuang, Junhao and Guo, Shi and Cai, Xin and Li, Xiaohui and Liu, Yihao and Yuan, Chun and Xue, Tianfan},
      journal={arXiv preprint arXiv:2510.12747},
      year={2025}
    }