Install Dependencies
May 17, 2026 · View on GitHub
Forcing-KV: Hybrid KV Cache Compression for Efficient Autoregressive Video Diffusion Models
Yicheng Ji1,2
Zhizhou Zhong2,3
Jun Zhang1
Qin Yang2
Xitai Jin2
Ying Qin4
Wenhan Luo3
Shuiyang Mao2
Wei Liu2
Huan Li1
1ZJU 2Video Rebirth 3HKUST 4BJTU
✨ Highlights
- KV Compression Method: Forcing-KV is a hybrid KV cache compression method for autoregressive video diffusion models that accelerates inference, reduces cache memory, and even improves quality.
- Inference Toolkit:This repository is an inference-side toolkit providing inference scripts for multiple models (Self-Forcing, LongLive, Causal Forcing,Krea-realtime-14B, Raven, Rolling-Forcing) and various acceleration techniques (Forcing-KV, Dummy Forcing, TeaCache, FP8 Quantization), facilitating research and comparative studies.
- Easy Evaluation:We also provide evaluation scripts for conveniently assessing VBench, VBench-Long, Helios-Bench, and the Chunk Discontinuity Metric.
Over 29 FPS with 30% cache memory reduction, up to 1.35× and 1.50× speedups on LongLive and Self Forcing at 480P resolution, and 2.82× at 1080P resolution.
📣 Latest News!!
- 2026-05-17: We evaluate Causal Forcing and Causal Forcing + Forcing-KV on VBench metric (84.41 vs. 84.60) and efficiency metric (22.81 FPS vs. 27.75 FPS, ~60GB memory vs. ~30GB memory on NVIDIA H200 GPU). Our method demonstrates both improved efficiency and quality!
- 2026-05-16: We add our Forcing-KV on
two new base models!(1) Causal Forcing is a direct upgraded version of Self-Forcing. (2) Raven is a Self-Forcing style model trained with Consistency-model Group Relative Policy Optimization (GRPO). New demos and inference scripts are available. - 2026-05-13: We provide the script of
driftVBench metrics here. - 2026-05-11: ArXiv paper available here!
- 2026-05-10: We open source the inference code. We support the
inferenceof Self-Forcing, LongLive, Krea-realtime-14B and Rolling-Forcing. - 2026-05-10: We support various
acceleration techniquesincluding Forcing-KV, Dummy Forcing, TeaCache, and FP8 Quantization. - 2026-05-10: We provide easy
evaluationsripts for conveniently assessing VBench, VBench-Long, Helios-Bench, and the Chunk Discontinuity Metric we purpose.
🎬 Video Demos
Longlive
Causal Forcing
Krea-realtime-14b
Raven
Self Forcing
Click any preview to view the full MP4. All demo files are available under here. More at our demo page.
Method
We apply static structural pruning and dynamic similarity pruning to different heads, accelerating inference, reducing cache memory while improving quality.
⚙️ Requirements and Installation
Installation
# Create Environment
git clone https://github.com/zju-jiyicheng/Forcing-KV
cd Forcing-KV
conda create -n forcingkv python=3.10 -y
conda activate forcingkv
# Install Dependencies
pip install torch torchvision torchaudio
pip install -r requirements.txt
pip install flash-attn --no-build-isolation
# Optional: FP8 quantization
git clone https://github.com/thu-ml/SageAttention.git
cd SageAttention
python setup.py install
Downloading Base Models
Downloading the base models ckpt to pretrained:
# Wan
hf download Wan-AI/Wan2.1-T2V-1.3B --local-dir pretrained/Wan2.1-T2V-1.3B
# Longlive
hf download Efficient-Large-Model/LongLive-1.3B --local-dir pretrained/Longlive-1.3B
# Self Forcing
hf download gdhe17/Self-Forcing --local-dir pretrained/Self-Forcing
# Causal Forcing
hf download zhuhz22/Causal-Forcing chunkwise/causal_forcing.pt --local-dir pretrained/Causal-Forcing
# Raven
hf download mvp-lab/RAVEN --local-dir pretrained/Raven # need to adapt
# Krea-realtime-14b
hf download krea/krea-realtime-video krea-realtime-video-14b.safetensors --local-dir pretrained/realtime
# Rolling Forcing
hf download TencentARC/RollingForcing --local-dir pretrained/Rolling-Forcing
Also modify the absolute path in utils/wan_wrapper.py and the .yaml files under configs/.
🚀 Quick Inference
Inference Scripts
# Forcing-KV
python inference.py --config_path configs/forcing-kv/forcingkv_longlive_inference.yaml
python inference.py --config_path configs/forcing-kv/forcingkv_causal_forcing_inference.yaml
python inference.py --config_path configs/forcing-kv/forcingkv_realtime_inference.yaml
python inference.py --config_path configs/forcing-kv/forcingkv_self_forcing_inference.yaml
python inference.py --config_path configs/forcing-kv/forcingkv_raven_inference.yaml
python inference.py --config_path configs/forcing-kv/forcingkv_longlive_interactive_inference.yaml ## Interacrive prompts
# Base model
python inference.py --config_path configs/longlive/longlive_inference.yaml
python inference.py --config_path configs/causal-forcing/causal_forcing_inference.yaml
python inference.py --config_path configs/self-forcing/self_forcing_inference.yaml
python inference.py --config_path configs/krea-14b/realtime_inference.yaml
python inference.py --config_path configs/raven/raven_inference.yaml
python inference.py --config_path configs/longlive/longlive_interactive_inference.yaml ## Interacrive prompts
# Dummy Forcing
python inference.py --config_path configs/dummy-forcing/dummy_longlive_inference.yaml
python inference.py --config_path configs/dummy-forcing/dummy_self_forcing_inference.yaml
Args
- Generation Length: Set the
num_output_framesparameter in the config file to control generated length. - Resolution: Set the
resolutionparameter to generate videos at the target resolution (480P, 720P, 1080P). - Custom Prompts: Set the
data_pathparameter to the prompt file you want to use. - Quantization: Set the
quantization_enabledparameter to enable or disable quantization.
🚀 Evaluation
- VBench / VBench-Long: see the documents here.
- Helios Bench: see the documents here.
- Chunk Discontinuity Metirc: see the documents here.
Citation
If you find our work useful in your research, please consider to cite our paper and this framework📝:
@misc{ji2026forcingkvhybridkvcache,
title={{Forcing-KV: Hybrid KV Cache Compression for Efficient Autoregressive Video Diffusion Models}},
author={Yicheng Ji and Zhizhou Zhong and Jun Zhang and Qin Yang and XiTai Jin and Ying Qin and Wenhan Luo and Shuiyang Mao and Wei Liu and Huan Li},
year={2026},
eprint={2605.09681},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2605.09681},
}
Acknowledgement
Our repository is built on Self-Forcing, LongLive, Dummy Forcing, and Helios. Thanks for their wonderful work.































