Open-source project
MeiGen-AI/OPSD-V avatar
MeiGen-AI/OPSD-V

OPSD-V: on-policy self-distillation for few-step autoregressive video generators

On-Policy Self-Distillation for Post-Training Few-Step Autoregressive Video Generators

704 stars46 forksPythonApache-2.0

At a glance

What is it?
OPSD-V post-trains an existing few-step autoregressive video generator without touching its sampler or cache mechanism. The student rolls out on its own generated KV cache while a teacher, given real-video history, supplies dense velocity targets.
Who is it for?
Adopt OPSD-V if you already run a few-step autoregressive video generator and your long rollouts drift, weaken in motion, or degrade as the generated KV cache grows. Do not adopt it if you need a training-free fix or you cannot supply paired real long videos and prompts for the teacher cache.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 2 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • MeiGen-AI/OPSD-V704 ★ · +31
Star history
Repository2026-09-172026-11-22
MeiGen-AI/OPSD-V673704

31 Stars in the last 66 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The long-rollout problem OPSD-V targets

Few-step autoregressive video generators produce long clips with low latency, but they degrade as they go. The README describes the mechanism plainly: each generated chunk is written back into the KV cache and becomes context for every later chunk. Small artifacts, weak motion, and semantic drift do not stay local. They compound.

OPSD-V is aimed at teams that already have such a generator and want to improve its long-horizon quality without retraining the sampler or changing how inference works. The README states that OPSD-V preserves the original few-step inference path, the number of denoising steps, and the inference-time cache mechanism. That constraint is the whole point. You are not swapping in a new architecture; you are post-training the one you deployed.

The project also documents a training-free diagnostic that motivates the method. Starting from the same real first chunk and prompt, the README compares a standard rollout against an intervention that refreshes older cache history from the corresponding real video while keeping the most recent chunk model-generated. The improved rollout under that data-assisted cache is presented as evidence that generated-cache degradation is the bottleneck. This is a diagnostic, not a benchmark, and the README does not quantify the gap.

How the student and teacher diverge on the same denoising state

The architecture is a two-role setup built around one rollout. The student performs the deployed rollout: it denoises each chunk with the fixed few-step scheduler, writes the generated chunk into its KV cache, and continues from the resulting self-induced state. The teacher is evaluated at the same temporal position, the same denoising timestep, and the same student-visited noisy latent. The difference is the cache. The teacher uses a cleaner AR-consistent cache in which older history is replaced by real-video context, while the most recent generated chunk is preserved for autoregressive continuation.

Training then matches student and teacher velocity predictions on those on-policy states. The README calls this dense trajectory-level velocity supervision. Because the teacher sees the same noisy latents the student actually visited, the correction is applied where the student will be at inference, not at states the model would never reach.

The repository layout reflects this split. model/ holds the OPSD rollout, teacher cache, and loss logic. pipeline/ contains the AR inference and OPSD streaming training pipelines. trainer/ holds the FSDP/LoRA trainer, EMA, resume, and checkpointing. wan/modules/ contains the Wan2.1 modules and causal attention implementation. The README lists chunk-wise backward, detached denoising transitions, FSDP, gradient checkpointing, and LoRA/EMA support as the memory-conscious training stack. That is a lot of machinery for one loss, and it tells you the rollout is the expensive part.

Installing OPSD-V and running a first inference check

The README points to an Installation section, and the repository ships requirements.txt at the top level. Install the Python dependencies from that file; the pinned entries include torch>=2.5.0, diffusers==0.31.0, transformers>=4.49.0, peft>=0.14.0, and omegaconf>=2.3.0.

bash
pip install -r requirements.txt

After that, the README directs you to the checkpoints section and the Hugging Face model page at https://huggingface.co/MeiGen-AI/OPSD-V. Download the released checkpoints before running inference. The repository also ships example/ with prompt files, including example/long_example.txt and example/MovieGenVideoBench_extended.txt, which the README describes as prompt files for quick inference checks.

bash
python inference.py

The README does not spell out the inference.py flags in the text available here, so check configs/ for the YAML that drives it. Training is launched from train.py, with configs/ holding the training and inference YAML files. One flag is called out explicitly in the highlights: --per_prompt_seed, described as deterministic prompt seeding that avoids noise drift when resuming a partially generated evaluation folder. If you interrupt a long evaluation and restart it, that flag is what keeps the samples comparable.

Where OPSD-V is the wrong tool

The teacher needs real long videos. The README is explicit that older cache history is replaced by real-video context, and the motivation section frames real long videos as privileged temporal context during post-training. If your dataset has no long real clips that correspond to the prompts you generate, the teacher has nothing cleaner to condition on and the method loses its premise. The training-free GT-cache diagnostic in the README makes the same assumption: it refreshes older cache history from the corresponding real video.

A second boundary is the base model. The repository wraps Wan2.1 modules under wan/modules/, and the README describes OPSD-V as post-training an existing few-step AR generator. Nothing in the README suggests it trains a generator from scratch, and nothing suggests it ports to an arbitrary architecture. If your generator is not the one this codebase wraps, expect integration work.

There is also a cost boundary. The student rollout is long, and the trainer uses FSDP, gradient checkpointing, chunk-wise backward, and detached denoising transitions to keep it feasible. Those are mitigations, not a small footprint. If you only need short clips, or your degradation appears within a single chunk rather than across the rollout, the trajectory-level supervision OPSD-V provides is aimed at a problem you may not have. The README does not document a short-clip use case.

OPSD-V compared with offline distillation and preference methods

The related searches around this project include comparisons with SDPO and a term written as D-OPSD, though the README does not discuss either. What the README does let you compare is the on-policy framing against the more common offline approach.

Offline distillation fixes a set of states in advance, usually by sampling from the base model or from a dataset, and trains the student to match teacher outputs at those states. The student then drifts into states the fixed set never covered, and the correction stops applying. OPSD-V's stated difference is that the student writes its own generated chunks into the KV cache and keeps rolling out from the resulting temporal states, while the teacher is evaluated at those same student-visited noisy latents and timesteps. The supervision follows the student rather than a precomputed buffer.

That choice has a price. On-policy rollout means every training step carries the cost of generating the trajectory, which is why the trainer leans on FSDP, gradient checkpointing, and chunk-wise backward. An offline pipeline can precompute targets once and reuse them. OPSD-V trades that reuse for coverage of the states the deployed model actually visits. The README does not report throughput or wall-clock numbers, so the size of that trade is not documented.

Licence, maintenance, and what upgrades cost

OPSD-V is released under Apache-2.0, per the LICENSE file and the badge in the README. Apache-2.0 permits commercial use and modification and includes a patent grant, but it also carries notice and attribution obligations for redistributed code. If you ship a product built on this repository, read the licence text itself rather than a summary, and check the terms attached to any model checkpoint you download separately, since the licence on the code and the terms on the weights are not necessarily the same document. That is a factual boundary, not legal advice.

The repository is not archived. The last push to main was on 2026-08-31, which is recent enough that the code is still changing. The repository has no published GitHub releases, so there is no tagged version to pin against. Upgrades therefore mean tracking main. The README documents resume and checkpointing support in trainer/, and the --per_prompt_seed flag exists specifically so a partially generated evaluation folder can be resumed without noise drift, which helps when a long run is interrupted. What the README does not document is a rollback path or a compatibility guarantee between configs/ YAML files across commits. If you depend on a specific behaviour, record the commit hash you trained against.

Editorial conclusion

Adopt OPSD-V if you already run a few-step autoregressive video generator and your long rollouts drift, weaken in motion, or degrade as the generated KV cache grows. Do not adopt it if you need a training-free fix or you cannot supply paired real long videos and prompts for the teacher cache. Before committing GPU time, verify that your generator matches the Wan2.1 module layout the repository wraps, that the checkpoint you intend to post-train is compatible with the LoRA and EMA paths in trainer/, and that your data pipeline can produce the long-video context the teacher consumes. The paper, checkpoints, and code were released on 9 Jul 2026, and the last push to main was on 2026-08-31, so the codebase is still moving.

Frequently asked questions

What is OPSD-V for post-training?

OPSD-V is an on-policy self-distillation paradigm for post-training few-step autoregressive video diffusion models. It targets long-horizon error accumulation and weakened motion dynamics in distilled AR video generators while preserving the original few-step inference path.

Does OPSD-V change the number of denoising steps used at inference?

No. The README states that OPSD-V does not change the original 4-step autoregressive sampler used at inference, and that the sampler, number of denoising steps, and inference-time cache mechanism all stay as they were.

What does the OPSD-V teacher use that the student does not?

The teacher is evaluated at the same temporal position, denoising timestep, and student-visited noisy latent, but uses a cleaner AR-consistent cache in which older history is replaced by real-video context while the most recent generated chunk is preserved. The student instead keeps rolling out from its own generated KV cache.

Official sources

  1. Issues
  2. License: Apache-2.0
  3. MeiGen-AI/OPSD-V on GitHub
  4. Project website
  5. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/meigen-ai-opsd-v.svg)](https://hysenlabs.com/projects/meigen-ai-opsd-v)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/meigen-ai-opsd-v.svg)](https://hysenlabs.com/projects/meigen-ai-opsd-v)

Was this useful?