r/StableDiffusion • u/reeight • 3d ago
News CodecOPSD for faster H3v & H3I
"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 about 70% of the condition tokens on MiniMax-H3 Ref2VA with almost unchanged quality and 1.87x faster denoising, and up to 8.4x faster with more conditions (three reference videos, higher-resolution references, more frames, and a higher drop rate).
On MiniMax-H3-Image, it drops about 65% of the reference tokens and makes denoising about 2x faster. More cases are on the project page."

https://huggingface.co/collections/HikariDawn/codecopsd
https://github.com/Kiteretsu77/CodecOPSD
Comfy: https://github.com/search?q=comfy+CodecOPSD&type=repositories
posted 6 or so days ago, code has some PRs merged so still under development.
Looks neat, but I'm about to go nap; comment with your results please.
2
u/swagerka21 3d ago
Comfy when
1
u/DietAshamed2246 3d ago
I am getting 10s H3 videos (0.3 mp pass-1, 1 mp pass-2) using LokkenJP's version of 10Eros-Max-Turbo in under 3 minutes and 16 mp H3-Image under 1 minute with ComfyUI stock Int8 model. How much faster can it possibly get?! Also, what does "almost unchanged quality" mean - is that an euphemism for "with some degradation"?
2
u/tomakorea 3d ago
'almost unchanged quality' is a bit concerning because even the original H3 isn't really good at fast motion and small details
1
u/Enshitification 3d ago
Does the time to train the LoRA on the kept tokens offset the faster denoisng time much?
1
u/Memestonks2020 3d ago
Really interesting.
Does this result in bit-wise identical output in seeds or differences due to the codec?
1
u/Apprehensive_Sky892 2d ago
Very interesting project. Currently, there are two ComfyUI implementations.
The first one is for making faster ref2va with video references: https://github.com/aaalll12322/ComfyUI-MiniMaxH3-CodecPrune and it claims a 1.8x speed up
Both rows use a 0.4–0.5 MP, 124-frame output. The second row was measured with SolAttn sparse attention enabled in both runs. The first row's 625-token reduction is real, but too small to register above run-to-run variation, which is why it is listed as no measurable change rather than as a gain.