fix: move baseline sample after inference flag stripping
_save_sample("baseline") was called before the vocoder's inference
tensors were sanitized, causing "Inference tensors do not track version
counter". Moved it after the clone/detach loop and vocoder.to(device).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -951,8 +951,6 @@ def _do_train(vocoder, mel_converter, clips,
|
||||
except Exception as e:
|
||||
print(f"[BigVGAN] Sample save failed ({label}): {e}", flush=True)
|
||||
|
||||
_save_sample("baseline")
|
||||
|
||||
# Sanitize all inference tensors in the vocoder.
|
||||
# Three categories to handle (all loaded in ComfyUI's inference_mode):
|
||||
#
|
||||
@@ -994,6 +992,9 @@ def _do_train(vocoder, mel_converter, clips,
|
||||
# After cloning, vocoder may be on CPU (offloaded before training).
|
||||
vocoder.to(device, dtype)
|
||||
|
||||
# Baseline sample — after sanitization so vocoder has normal tensors.
|
||||
_save_sample("baseline")
|
||||
|
||||
# ── GAFilter injection ─────────────────────────────────────────────────
|
||||
# GAFilter params are fresh tensors — no inference flag to strip.
|
||||
if use_gafilter:
|
||||
|
||||
Reference in New Issue
Block a user