Repository navigation
fix(rollout): read the waveform from the response's audio stream - #408
Merged
Merged
Conversation
Rockdu
force-pushed
the
rockdu/rollout-waveform-from-extra-streams
branch
from
November 24, 2026 09:36
13aa699 to
fd1f509
Compare
4 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Independent of the AV rollout stack (#403 … #407); based on
main.This branch also carries #422, which was merged into it: rewards score
GeneratedMediaand each scorer declaresrequired_media(commit3dcb12a). Its description and itsrun-ci-e2erun (45373265854, all stages green on this branch's tree) are on #422. Merged intomainwith a rebase merge, so the two commits stay separate.What
extra_streams.audio.generated_outputand.sample_rate([Feat] diffusion: [sglang-miles] Roll out the LTX-2 audio stream as a named extra stream sgl-project/sglang#51078). The parser used to read a top-levelgenerated_audio/audio_sample_rate, which the engine does not send, soSample.generated_audiowas alwaysNoneand saved or logged videos had no sound.--use-output-store, a training rollout's waveform is a store ref like its video.release_generated_outputsnow releases it with the sample's output: the few samples kept for media logging read it back as a tensor, the others drop it, and both fields are deleted from the store.docs/models/h3/h3.mdsaid the saved eval videos are silent until an engine change adds audio to the rollout response. With the parser fixed they carry the engine's audio track, so that sentence is replaced.Why
write_sample_mediamuxessample.generated_audiointo the mp4. Once the parser fills that field, a waveform left as a store ref would reach the muxer in the media-logging thread and fail there, and that round's videos would not be logged either. So the release has to change in the same PR as the parser.Behaviour change: eval media and logged training media of models that return audio (LTX, H3) gain their audio track. For LTX video-only recipes the engine runs with audio-video cross attention patched off, so that track comes from an audio branch that did not see the video.
With
--rm-type nonethe engine skips the whole decode stage, so there is no waveform either; "has a waveform" implies "has a generated output", which is why the release keeps selecting samples by their stored output.GPU run
At the previous head
13aa699, merged with the audio-video recipe branch of #413: a 100-rollout LTX-2.3 audio-video Flow-GRPO run on 5 H200 with the output store on. All 40 logged training videos carry an audio track, so the LTX waveform layout is the[C, L]that_mux_audioassumes and media logging with the store on writes sound.Not validated
fd1f509, which rewrote howrelease_generated_outputsnames the fields it deletes (same behaviour, covered by the CPU tests).Validation
CPU only.
tests/fast/rollout,tests/fast/utils/test_diffusion_rollout_response.py,test_api_rm_config.py,test_output_store_materialize.py, on Linux (twotest_sft_read_media.pycases that need a writable HF cache are deselected; they fail onmainthere too)fd1f509, onmain4cb1a29tests/fast/rolloutandtests/fast/utilson macOS (minus two files that fail onmainon that machine)13aa69913aa699, not re-runThe four mutations: the waveform read from the top level; a released sample keeping its waveform's store ref; only the output field deleted; the waveform read through the video layout normalisation.
Files
miles/utils/diffusion_rollout_response.py: read the waveform from the audio stream.miles/rollout/sglang_diffusion_rollout.py:release_generated_outputshandles a stored waveform.miles/utils/types.py: field comment.docs/models/h3/h3.md: the sentence about silent eval videos.tests/fast/utils/test_diffusion_rollout_response.py,tests/fast/rollout/test_generated_output_store.py: the cases above.Checklist
pre-commit run --all-filespasses — run on the touched files only, clean (atfd1f509)pytest -xis green — CPU subset only, see Validationpython3 train.py --helpstill parses — no flag changed