ComfyUI/comfy/ldm
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
..
ace Make ace step 1.5 base model work properly with default workflow. (#12337) 2026-02-06 19:14:56 -05:00
anima Fix anima LLM adapter forward when manual cast (#12504) 2026-02-17 07:56:44 -08:00
audio Enable Runtime Selection of Attention Functions (#9639) 2025-09-12 18:07:38 -04:00
aura Enable Runtime Selection of Attention Functions (#9639) 2025-09-12 18:07:38 -04:00
cascade Enable Runtime Selection of Attention Functions (#9639) 2025-09-12 18:07:38 -04:00
chroma Implement NAG on all the models based on the Flux code. (#12500) 2026-02-16 23:30:34 -05:00
chroma_radiance Use torch RMSNorm for flux models and refactor hunyuan video code. (#12432) 2026-02-13 15:35:13 -05:00
cosmos Some fixes to previous pr. (#12339) 2026-02-06 20:14:52 -05:00
flux Implement NAG on all the models based on the Flux code. (#12500) 2026-02-16 23:30:34 -05:00
genmo Enable Runtime Selection of Attention Functions (#9639) 2025-09-12 18:07:38 -04:00
hidream Enable Runtime Selection of Attention Functions (#9639) 2025-09-12 18:07:38 -04:00
hunyuan3d Enable Runtime Selection of Attention Functions (#9639) 2025-09-12 18:07:38 -04:00
hunyuan3dv2_1 Fix issue on old torch. (#9791) 2025-09-10 00:23:47 -04:00
hunyuan_video Implement NAG on all the models based on the Flux code. (#12500) 2026-02-16 23:30:34 -05:00
hydit Change cosmos and hydit models to use the native RMSNorm. (#7934) 2025-05-04 06:26:20 -04:00
kandinsky5 Fix qwen scaled fp8 not working with kandinsky. Make basic t2i wf work. (#11162) 2025-12-06 17:50:10 -08:00
lightricks fix: cast mel_spec to waveform dtype in AudioVAE encode to support --bf16-vae 2026-05-13 22:56:59 +02:00
lumina Feat: z-image pixel space (model still training atm) (#12709) 2026-03-02 19:43:47 -05:00
mmaudio/vae Implement the mmaudio VAE. (#10300) 2025-10-11 22:57:23 -04:00
models Flux 2 (#10879) 2025-11-25 10:50:19 -05:00
modules feat: Support SDPose-OOD (#12661) 2026-02-26 19:59:05 -05:00
omnigen Enable Runtime Selection of Attention Functions (#9639) 2025-09-12 18:07:38 -04:00
pixart Remove windows line endings. (#8866) 2025-07-11 02:37:51 -04:00
qwen_image Add working Qwen 2512 ControlNet (Fun ControlNet) support (#12359) 2026-02-13 22:23:52 -05:00
wan feat: Support SCAIL WanVideo model (#12614) 2026-02-28 16:49:12 -05:00
common_dit.py add RMSNorm to comfy.ops 2025-04-14 18:00:33 -04:00
util.py New Year ruff cleanup. (#11595) 2026-01-01 22:06:14 -05:00