Use H.264 to decide which tokens of video diffusion condition can skip CodecOPSD, a method that uses a video codec to prune redundant condition tokens before the diffusion transformer (DiT) and then trains a small LoRA on the kept tokens via on-policy self-distillation, cut denoising time on MiniMax-H3 Ref2VA from 1013 s to 121 s (8.4x faster) in an extreme setting that pruned 90% of three reference videos' tokens, reducing tokens from 232k to 24k and VLM tokens from 47.7k to 11.0k. The project released inference and training code for MiniMax-H3 Ref2VA and MiniMax-H3-Image on 2026-11-22, published models and Hugging Face Spaces on 2026-11-24 and 2026-11-27, optimized MiniMax-H3 Ref2VA for 12 to 32 GB consumer GPUs (RTX 3090, 4090, 5090) on 2026-11-30, and shipped a ComfyUI integration on 2026-12-02. Other reported speedups include 6.8x on an anime two-shot case (731 s to 108 s), 3.1x on a six-reference desk scene (29.7 s to 9.5 s) and 7.6x on a 16-reference group photo (302.9 s to 39.6 s). Sequence-wise generators MiniMax-H3 Ref2VA, MiniMax-H3-Image, Qwen-Image 2.1, FLUX 3 Image Klein append every reference to the sequence, where computation cost grows dramatically. We propose CodecOPSD to prune the redundant condition tokens with a video codec, and we train a small LoRA on the kept tokens via on-policy self-distillation. On average, CodecOPSD drops consumer GPUs 12 to 32 GB : a 5 s 480p video in Consumer GPUs consumer gpus . On MiniMax-H3-Image, it drops project page https://kiteretsu77.github.io/CodecOPSD website/ . 🎬 Visualization visualization | πŸ”₯ News news | πŸ”§ Installation installation | ⚑ Quickstart quick start | ComfyUI comfyui | πŸš€ Inference inference | 🧩 Codec Pruning codec pruning | πŸ‹οΈ Train training ⭐ If you like CodecOPSD, please help ⭐⭐star⭐⭐ this repo. Thanks πŸ€— Teacher = the released model, every condition token. + CodecOPSD student = the same model with codec pruning and the CodecOPSD LoRA. Everything else is the same; only the number of condition tokens differs. Times are denoising times. Silver wolf in a dusk desert : 2 pictures + 3 videos β†’ 768p, 243 frames, Pika H3 Flex 6 steps, B200.