Three more example folders alongside inference/, all CPU/numpy, self-contained (sys.path bootstrap), public API only, every script verified to run green. training/ (7) — one per method, all via the uniform method.train_step seam: 01 finetune · 02 dmd2 distillation · 03 diffusion_nft (likelihood-free RL, samples from the old policy, feature-cache reuse) · 04 self-forcing (causal chunk_rollout) · 05 joint LM+generator RL (UniRL; joint + prompt-only) · 06 N-way joint RL (per_expert vs shared credit) · 07 end-to-end workflow RL (T2I+I2V from one final-video reward). omni/ (4) — 01 Cosmos3 (reason→joint denoise, shared MoT) · 02 BAGEL (text→image, shared MoT; scheduler prices both WorkUnit kinds) · 03 Qwen-Omni (thinker→talker→vocoder, three separate experts, text+audio) · 04 interleave parity across AR + diffusion loop types. workflows/ (2) — 01 cross-model T2I→I2V workflow (image provably conditions the video) · 02 workflow as a first-class servable (requires/validate, address by id, register_workflows catalog, WorkflowRegistry). Each folder has a README indexing its scripts.
v2_examples/omni — MoT & cascade models
Runnable examples of the omni models: one request that spans multiple loop types. Two topologies (designv4 §2.3):
- MoT / shared-weight (Cosmos3, BAGEL) — ONE resident instance whose
transformerruns both anar_decodeloop and adiffusion_denoiseloop on the same weights. Every AR token and denoise step is a runtime-visible WorkUnit (the differentiation vs vllm-omni's opaque DIFFUSION stage). - Cascade / separate experts (Qwen-Omni) — three distinct experts on three loop types
(
thinker → talker → vocoder), cross-stage conditioning, streaming codec→waveform.
Run from anywhere:
python3 v2_examples/omni/01_cosmos3.py
| Script | Model | Loops in one request |
|---|---|---|
01_cosmos3.py |
Cosmos3 (shared MoT) | ar_decode (reason) → diffusion_denoise (joint video) |
02_bagel.py |
BAGEL (shared MoT) | ar_decode (generate_text) → diffusion_denoise (generate_image) |
03_qwen_omni.py |
Qwen-Omni (3 separate experts) | ar_decode → ar_decode → audio_decode (text + speech) |
04_interleave_across_loop_types.py |
— | the interleave parity gate holds across AR + diffusion steps |
build_omni_engine() registers all three; see designv4 §9.5 (Qwen-Omni cascade).