Spaces:
Running on Zero

techfreakworm commited on
Commit
cbfbe87
·
unverified ·
1 Parent(s): b53ebb3

fix: the audio a user uploads must reach the model

Browse files

There is no audio= argument on any LTX2 pipeline: audio enters as
pre-encoded audio_latents. The UI wrote request.audio, modes._with_audio
read request.audio_latents, and NOTHING JOINED THEM. Both ends were built.
encode_waveform_to_latents existed, was exported and documented, and had an
importer count of zero.

So audio_to_audio and audio_to_video discarded the upload and generated
fresh audio. The run succeeded, the artifact was valid, every test passed,
and only the user's own ears would ever have told them -- while the field's
help text said 'Encoded to audio latents before the call', describing a step
that did not exist. Resilience lesson 2 inverted: a silent success.

generate._prepared_audio joins them, after the pipeline exists because the
encode needs its audio_vae. A mode given audio with no audio_vae to encode
it now refuses loudly rather than generating a plausible track nobody asked
for. audio.load_waveform reads the file gr.Audio(type='filepath') hands us.

The fixtures were the reason this was invisible, so they are the larger part
of the change. test_ui_generate_seam ALREADY handed audio_to_audio an audio
input -- it just asserted nothing about where it went. FakePipeline now
carries an audio_vae because the real pipeline does, and FakeAudioVae is
deliberately rich: the encode reads all six PLAN 5.4 config parameters,
finds a mel front-end rather than building one, and asserts the latent rank,
so a thinner fake would let a broken encode pass.

Removing the join turns the acceptance tests red with the pipeline kwargs
printed -- noise_scale present, audio_latents absent, which is the mechanism
exactly: the input never travelled far enough for noise_scale to be what
discarded it.

5 files changed +231 -2
Files changed (5)
ltx25_studio/audio.py+19
ltx25_studio/generate.py+46-1
tests/conftest.py+62
tests/test_exports_contract.py+4
tests/test_ui_generate_seam.py+100-1