mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-14 19:17:32 +08:00
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> |
||
|---|---|---|
| .. | ||
| vae | ||
| vocoders | ||
| av_model.py | ||
| embeddings_connector.py | ||
| latent_upsampler.py | ||
| model.py | ||
| symmetric_patchifier.py | ||