Skip to content

satrioopw/ComfyUI_FlashVSR

 
 

Repository files navigation

ComfyUI_FlashVSR

FlashVSR: Towards Real-Time Diffusion-Based Streaming Video Super-Resolution,this node ,you can use it in comfyUI

Upadte

  • update to version v1.1 /更新适配1.1版本的新模型和代码,降低闪烁,提高保真度和稳定性
  • add full mode lightx2v vae encoder support(only lightvaew2_1.pth,taew2_1.pth,lighttaew2_1.pth) and Wan2.1-VAE-upscale2x support
  • 新增lightx2v 加速vae decoder支持和Wan2.1-VAE-upscale2x 放大decoder支持,只是在full 模式下有效,light的加速模型目前只支持(lightvaew2_1.pth #32.2M,taew2_1.pth,lighttaew2_1.pth) 三个文件

Tips

  • 满足部分网友需要超分单张图片的奇怪要求,默认输出25帧1秒的视频,详见示例,Block-Sparse-Attention 目前不支持5090的sm120架构,需要改一下Block-Sparse-Attention的源码来支持;
  • 同步tiny的专属long模式
  • 新增切片视频路径加载节点,输入保存切片视频的路径,开启自动推理,即可推理完路径所有视频;
  • 修复输入图像归一化处理错误导致无法复现官方的问题,分离decoder,新增关键点模型卸载和OOM处理,包括处理超长视频向量的OOM,同步官方local range的修改,新增小波模式下的加减帧处理(项目一作大佬提的);
  • local_range=7这个是会最清晰,local_range=11会比较稳定,color fix 推荐用小波(没重影);
  • 编译Block-Sparse-Attention window的轮子 可以使用 smthemex 强制编译版 或者 lihaoyun6 要联网 两个fork来,不推荐用官方的
  • Block-Sparse-Attention 正确安装且能调用才是方法的完全体,当前的函数实现会更容易OOM,但是Block-Sparse-Attention轮子实在不好找,目前只有CU128 toch2.7的,我提供的(cu128,torch2.8,py311单体)或者自己编译
  • 方法是基于现有prompt.pt训练的,新增tile 和 color fix 选项,tile关闭质量更高,需要VRam更高,corlor fix对于非模糊图片可以试试。修复图片索引数不足的错误。
  • Choice vae infer full mode ,encoder infer tiny mode 选择vae跑full模式 效果最好,tiny则是速度,数据集基于4倍训练,所以1 scale是不推荐的;
  • 如果觉得项目有用,请给官方项目FlashVSR 打星; if you Like it , star the official project link

1.Installation

In the ./ComfyUI/custom_nodes directory, run the following:

git clone https://github.com/smthemex/ComfyUI_FlashVSR

2.requirements

pip install -r requirements.txt

要复现官方效果,必须安装Block-Sparse-Attention torch2.8 cu2.8 py311 wheel or CU128 toch2.7

git clone https://github.com/mit-han-lab/Block-Sparse-Attention 
# git clone https://github.com/smthemex/Block-Sparse-Attention # 无须梯子强制编译
# git clone https://github.com/lihaoyun6/Block-Sparse-Attention # 须梯子
cd Block-Sparse-Attention
pip install packaging
pip install ninja
python setup.py install

3.checkpoints

├── ComfyUI/models/FlashVSR
|     ├── LQ_proj_in.ckpt # v1.1 or v1.0
|     ├── TCDecoder.ckpt
|     ├── diffusion_pytorch_model_streaming_dmd.safetensors #v1.1 or v1.0
|     ├── posi_prompt.pth
├── ComfyUI/models/vae
|        ├──Wan2.1_VAE.pth
|        ├──lightvaew2_1.pth  #32.2M  or taew2_1.pth,lighttaew2_1.pth
|        ├──Wan2.1_VAE_upscale2x_imageonly_real_v1_diff.safetensors  # rename from diffusion_pytorch_model.safetensors

Example

  • upscale2x and ligth lightvaew2_1.pth
  • single image VSR
  • full old node
  • tiny new
  • video files loop

Acknowledgements

DiffSynth Studio
Block-Sparse-Attention
taehv

Citation

@misc{zhuang2025flashvsrrealtimediffusionbasedstreaming,
      title={FlashVSR: Towards Real-Time Diffusion-Based Streaming Video Super-Resolution}, 
      author={Junhao Zhuang and Shi Guo and Xin Cai and Xiaohui Li and Yihao Liu and Chun Yuan and Tianfan Xue},
      year={2025},
      eprint={2510.12747},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2510.12747}, 
}

lightx2v

@misc{lightx2v,
 author = {LightX2V Contributors},
 title = {LightX2V: Light Video Generation Inference Framework},
 year = {2025},
 publisher = {GitHub},
 journal = {GitHub repository},
 howpublished = {\url{https://github.com/ModelTC/lightx2v}},
}

About

FlashVSR:Towards Real-Time Diffusion-Based Streaming Video Super-Resolution,you can use it in comfyUI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%