test_extra_overrides_routing
¶
LTX-2 audio-conditioning kwargs must reach ForwardBatch.extra and SamplingParam.update() must reject unknown kwargs instead of silently dropping them.
Background: prior to PR-1288 a chain of LTX-2 audio kwargs
(audio_num_frames, ltx2_audio_clean_latent …) silently flowed
into SamplingParam.update() which logger.error'd and dropped
them. That made every continuation segment generate audio for the
default num_frames duration, which in turn fed an A/V duration
mismatch into av_streaming.stream_fmp4 whose -shortest ffmpeg
invocation closed stdin before the writer thread had pushed every
frame, surfacing as BrokenPipeError in the streaming server.
These tests pin two contracts
_BATCH_EXTRA_PASSTHROUGH_KEYSlists the exact set of kwargs pulled out ofgenerate_video(**kwargs)forbatch.extra.SamplingParam.update()raisesValueErroron unknown keys.
Classes¶
Functions¶
fastvideo.tests.api.test_extra_overrides_routing.test_passthrough_keys_are_not_sampling_param_fields
¶
If any of these become SamplingParam fields, the routing block
in video_generator.py needs to be re-evaluated — they would no
longer need to be popped before sampling_param.update().
Source code in fastvideo/tests/api/test_extra_overrides_routing.py
fastvideo.tests.api.test_extra_overrides_routing.test_sampling_param_update_error_mentions_passthrough_route
¶
The error message should point future contributors at the right routing mechanism so they don't re-introduce silent dropping.
Source code in fastvideo/tests/api/test_extra_overrides_routing.py
fastvideo.tests.api.test_extra_overrides_routing.test_sampling_param_update_rejects_audio_passthrough_keys
¶
LTX-2 audio kwargs must NOT slip through update() — they
belong to ForwardBatch.extra and the routing block in
video_generator.py is responsible for popping them first.
Source code in fastvideo/tests/api/test_extra_overrides_routing.py
fastvideo.tests.api.test_extra_overrides_routing.test_sampling_param_update_rejects_partially_unknown_keys
¶
Even when most keys are valid, a single unknown key must raise. Partial-success was the silent-failure mode this regression fixes.