TL;DR: CodecOPSD uses codec pruning to drop redundant condition tokens in video generation.
It works on 16 condition modalities and drops 66% of the condition tokens on average with no clear quality drop.
Modern visual generative models operate on tokens, and every visual asset they receive, whether a reference image, a sketch, a depth map, or a motion video, is tokenized and appended to the input token sequence. Consequently, conditioning quickly dominates the computation cost. Yet most of these tokens carry redundant spatiotemporal information. Our key insight is that identifying what is genuinely new is exactly the problem that classical video codecs have long solved. Thus, we first introduce a codec-based token pruning method that discards redundant tokens. Then, we develop an on-policy self-distillation (OPSD) strategy to train a DiT adapter capable of learning the codec pruning pattern well without quality degradation. Together, they form On-Policy Codec Distillation (CodecOPSD). We scale CodecOPSD to 16 condition modalities on our own video diffusion model, where it prunes 66% of the condition tokens on average with almost no quality drop. Therefore, denoising becomes 2× faster, and the cache memory shrinks by 70% in KV cache mode. CodecOPSD also extends to multiple state-of-the-art pretrained image and video generative models, where its benefit grows further with more conditions, more frames, and higher resolution.


The word comes from Picture 1, where the plane tows the banner. Codec pruning keeps the letters and drops the empty sky around them. Video 2 provides the layout of the plane and the running man. Video 3 provides the camera pan.













−13%
−16%
thruster effect−87%
−53%
−54%
−65%
−18%
−32%
−30%
−24%
key pose: hand−52%
−53%
−54%
−65%
−18%
−32%
−23%
−23%
−53%
−54%
−65%
−18%
−32%
−28%
slash effect−62%
−47%
−54%
−53%
−54%
−65%
−18%
−32%
−46%
ring effect−82%
−54%
−53%
−54%
−65%
−18%
−32%

































Switch off Codec pruning to see each input before pruning.




Red: the drop of this clip; grey: the paper's average over the test set (66% over all conditions).



On MiniMax-H3 Ref2VA (top) and MiniMax-H3-Image (bottom), the speed-up grows with more references, higher resolution, and more frames, at the dense model's quality.

@article{wang2026codecopsd,
title = {On-Policy Codec Distillation for Efficient All-in-One Video Generation},
author = {Wang, Boyang and Blackburn-Matzen, Kevin and Saha, Oindrila and Gadelha, Matheus and Cheng, Zezhou},
year = {2026}
}