waveform_to_mel() performs mel filterbank computation in float32
regardless of input dtype, discarding the bfloat16 cast applied by
the VAE encode path in sd.py. The resulting float32 mel spectrogram
is then passed to the bfloat16 autoencoder encoder, causing a
RuntimeError at the first conv layer when --bf16-vae is active.
Fix by casting mel_spec to waveform.dtype (already set to vae_dtype
by the caller) before passing to self.autoencoder.encode(). This is
a no-op when --bf16-vae is not used.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
For LTX Audio VAE, remove normalization of audio during MEL spectrogram creation.
This aligs inference with training and prevents loud audio from being attenuated.