Repository navigation
Conversation
865cb64 to
29b34bc
Compare
29b34bc to
b0ed761
Compare
… return only its trajectory
80711a2 to
6613ac2
Compare
Short term: problems this PR should fix before mergeP0-1. Ming and Nomas crash inside the decoding stage when the flag is set. P0-2. LTX-2 AV, JoyEcho AV and Helios (chunked path) ignore the flag, run the full DiT + VAE, and only then get a 400. P0-3. H3 fails verification for P1. Every skipped training rollout now runs P2. In three modes the request fails with the wrong error. No wrong data, but the message blames something else:
Fixes, smallest set that closes P0 and P1
Kept from the PR, checked: the field stays in the batch signature (no Long termKeep the stage-local design and make the decorator the contract: every |
|
Required checks failed on 6613ac2; this PR cannot be merged until they pass. PR title (run)
Lint (run) |
Motivation
Data-free DMD2 in miles-diffusion (radixark/miles_diffusion#343) trains only on the rollout trajectory: the student's input and x0 prediction from
dit_trajectory, and the cond fromdenoising_env. With no reward model, nothing reads the decoded media of a training rollout. Every rollout request still runs the VAE decode (video and, for MiniMax H3, audio) and ships the decoded video. For H3 at 768p 16:9 5 s that is 124×768×1344×3 B = 384 MB per sample even asuint8, about 123 GB per 320-sample rollout through HTTP and msgpack.Modifications
RolloutRequest/SamplingParams:rollout_return_generated_output, defaultTrue(no behavior change). It is aSamplingParamsfield withoutbatch_sig_exclude, so requests that decode and requests that don't are never batched together.rollout_output_without_decode(stages/decoding.py): theOutputBatchwith the rollout trajectory, trajectory timesteps / latents, metrics and usage, and no media.DecodingStage.forwardandMiniMaxH3DecodingStage.forwardreturn it first thing when the field isFalse, before loading or running a VAE. H3'sverify_outputaccepts that output (no media, a rollout trajectory) and still rejects any other empty output.rollout_generaterejects a request with the fieldFalsewhose output came back decoded anyway (400). Decoding stages that overrideforwardwithout the check (LTX-2, Cosmos3, MOVA, ...) would otherwise decode silently; they can opt in the same way._build_responsetakes the response count fromnum_outputs_per_promptwhen there is no output.Accuracy Tests
MiniMax-H3 (t2va, 2×B200 TP2, 768p 16:9 4 s = 1344×768 / 107 frames, 4 steps,
ode, seed 1234,rollout_video_dtype=uint8,rollout_return_dit_trajectoryandrollout_return_denoising_envon), on a tree with this commit and #46544 (audio in the response) on top ofsglang-miles2a2fb73; the two touch separate response fields:rollout_return_generated_output=False,dit_trajectory(latents[5, 32256, 96], timesteps, sigmas, step indices),denoising_env(9 tensors) androllout_log_probsare bitwise equal to the decoded request's;generated_outputisNone.sglang-miles2a2fb73 on the same request, the decoded video,dit_trajectory,denoising_envandrollout_log_probsare bitwise equal.Speed Tests and Profiling
Same setup, after one warm-up request:
rollout_return_generated_output=False(4 runs)MiniMaxH3DecodingStageinference_time_sThe remaining 63.7 MB is the full 5-latent trajectory; a DMD2 request that stops at a step and returns two latents ships about 25 MB.
Tests
test_rollout_api.py:Req), and defaults toTrue;DecodingStageandMiniMaxH3DecodingStagereturn the request's trajectory without touching the VAE;test_rollout_api.py; 443 passed across the 29 unit files that touch decoding, H3, rollout and sampling params.pre-commit runon the changed files is clean.CI States
Latest PR Test (Base): ❌ Run #42312084991
Latest PR Test (Extra): ❌ Run #42312084872
Latest PR Test (AMD ROCm 10): ❌ Run #42312084897
Tip
Base CI only covers the core cases, and its workload may not exercise your change. Use
/rerun-testto run the tests your change touches, or copy this prompt for an agent: