From 187b2e316982bdac603b0de7b9328445a0b0b2c6 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Fri, 10 Apr 2026 00:24:11 +0200 Subject: [PATCH] fix: cast GAFilter to model dtype after injection GAFilter conv weights are created as float32 but the rest of the vocoder is bfloat16. vocoder.to(device) missed the dtype cast, causing conv1d dtype mismatch when Snake bfloat16 output flows into GAFilter. Co-Authored-By: Claude Opus 4.6 --- nodes/selva_bigvgan_trainer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/selva_bigvgan_trainer.py b/nodes/selva_bigvgan_trainer.py index 465711f..25e096a 100644 --- a/nodes/selva_bigvgan_trainer.py +++ b/nodes/selva_bigvgan_trainer.py @@ -895,7 +895,7 @@ def _do_train(vocoder, mel_converter, clips, # GAFilter params are fresh tensors — no inference flag to strip. if use_gafilter: n_gaf = inject_gafilters(vocoder, gafilter_kernel_size) - vocoder.to(device) + vocoder.to(device, dtype) print(f"[BigVGAN] GAFilter injected: {n_gaf} filters kernel={gafilter_kernel_size}", flush=True) # ── Training mode: select which parameters to train ──────────────────────