From 11457fc27a3bf03f3dcef813b78ab4e65fa5cc61 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Fri, 27 Mar 2026 21:56:06 +0100 Subject: [PATCH] =?UTF-8?q?debug:=20fix=20VAE=20load=5Fstate=5Fdict=20diag?= =?UTF-8?q?nostic=20=E2=80=94=20load=20into=20.model=20directly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AutoencoderPretransform.load_state_dict() doesn't return IncompatibleKeys. Load into pretransform.model (AudioAutoencoder) to get the return value and see actual missing/unexpected key counts. Co-Authored-By: Claude Sonnet 4.6 --- nodes/model_loader.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nodes/model_loader.py b/nodes/model_loader.py index 8daab2d..a004ba9 100644 --- a/nodes/model_loader.py +++ b/nodes/model_loader.py @@ -125,7 +125,9 @@ class PrismAudioModelLoader: # strict=False: vae.ckpt is a training checkpoint that also contains # discriminator, loss modules, and EMA wrappers not present in the # inference AudioAutoencoder — ignore those extra keys. - vae_result = model.pretransform.load_state_dict(vae_state, strict=False) + # Load directly into the inner AudioAutoencoder to get IncompatibleKeys back + # (AutoencoderPretransform.load_state_dict doesn't return the result) + vae_result = model.pretransform.model.load_state_dict(vae_state, strict=False) print(f"[PrismAudio] VAE load: missing={len(vae_result.missing_keys)}, unexpected={len(vae_result.unexpected_keys)}", flush=True) if vae_result.missing_keys: print(f"[PrismAudio] VAE missing (first 10): {vae_result.missing_keys[:10]}", flush=True)