CodecOPSD Trims H3 Reference Tokens for 2x Faster Video
CodecOPSD prunes about 70% of the condition tokens in MiniMax-H3 Ref2VA and trains a LoRA on what is left, for roughly 1.9x faster multi-reference video.
Stills from the project gallery. Only the tokens the codec keeps reach the transformer; the rest is rebuilt from context.
What it drops
H3 appends every reference (identity, prop, scene, motion clip, first and last frame) to the input sequence as tokens. Most of them repeat spatiotemporal information the model already has. CodecOPSD runs a classical video codec over the reference set, keeps the tokens flagged as new, and a small LoRA trained by on-policy self-distillation learns to generate from that shortened sequence.
| Model | Condition tokens dropped | Denoising speed |
|---|---|---|
| MiniMax-H3 Ref2VA | ~70% | 1.87x, up to 8.4x with 3 reference videos or higher-res refs |
| MiniMax-H3-Image | ~65% | ~2x |
These figures are the authors' own, from the model card and the arXiv report. The 8.4x is the best case with several conditions.
Five generations, one short film
The card's "Robot versus Monster" film was made in five Ref2VA runs with no teacher pass and no editing: 768x1344, 737 frames, 279,552 condition tokens cut to 90,396 (-68%), 348 s of denoising per part on one B200.
The greybox clip below is what the model was conditioned on (grey boxes stand for the tokens the codec dropped); the second clip is the output from that same condition set.
Run it
There is no ComfyUI node yet: the pruning step sits in front of the transformer, so a plain LoraLoaderModelOnly on the H3 Ref2VA graph will not reproduce these numbers. The weights are a rank/alpha 128 FP32 LoRA (2.6 GB) for transformer_ref.
- Install the pipeline:
git clone https://github.com/Kiteretsu77/CodecOPSD.git && cd CodecOPSD && pip install -e ".[app]" - Pull the base weights:
python -m codecopsd.download minimax_h3_ref2va --no-examples, thenpython app.py ref2vafor the Gradio UI. - Load the adapter with
pipe.load_condition_lora("HikariDawn/CodecOPSD-H3-Ref2VA", weight_name="codecopsd_minimax_h3_ref2va.safetensors")before sampling.
Get it
- LoRA weights: HikariDawn/CodecOPSD-H3-Ref2VA
- Image variant (H3-Image, ~65% tokens, ~2x): HikariDawn/CodecOPSD-H3-Image
- Code: Kiteretsu77/CodecOPSD · Demo: Space · Project page · arXiv 2611.31184
Comments
Sign in with GitHub to join the discussion.