ComfyUI/comfy/ldm/lightricks/vae
jjdejong ddac8fd48e fix: cast mel_spec to waveform dtype in AudioVAE encode to support --bf16-vae
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>
2026-05-13 22:56:59 +02:00
..
audio_vae.py fix: cast mel_spec to waveform dtype in AudioVAE encode to support --bf16-vae 2026-05-13 22:56:59 +02:00
causal_audio_autoencoder.py Support the LTXAV 2.3 model. (#12773) 2026-03-04 20:06:20 -05:00
causal_conv3d.py Reduce LTX2 VAE VRAM consumption (#12028) 2026-01-22 16:54:18 -05:00
causal_video_autoencoder.py Support the LTXAV 2.3 model. (#12773) 2026-03-04 20:06:20 -05:00
conv_nd_factory.py Support LTXV 0.9.5. 2025-03-05 00:13:49 -05:00
dual_conv3d.py Support LTXV 0.9.5. 2025-03-05 00:13:49 -05:00
pixel_norm.py Support Lightricks LTX-Video model. 2024-11-22 08:46:39 -05:00