Skip to content

fix(tts): prevent runaway semantic filler loops - #4

Open
Lucas1479 wants to merge 1 commit into
mainfrom
codex/gsv-semantic-stability
Open

fix(tts): prevent runaway semantic filler loops#4
Lucas1479 wants to merge 1 commit into
mainfrom
codex/gsv-semantic-stability

Conversation

@Lucas1479

Copy link
Copy Markdown
Owner

Summary

  • make static/CUDA-Graph KV attention exclude unused slots and graph-key alignment gaps
  • keep CUDA Graph capture sampling-RNG neutral and preserve full prompt/history when a bucket fills
  • make FlashAttention2 bucket mode attend only the real contiguous prefix
  • add a language/token-ID-independent semantic admission check that retries once before SoVITS/BigVGAN and fails closed if both candidates collapse
  • preserve upstream overlay ownership, native infer_panel_naive() generators, streaming inference, and the upstream ref-free idx=0 convention

Closes #3.

Related Amadeus integration: Code-Amadeus/Amadeus#22

Verification

  • 92 passed, 1 skipped across tests/
  • ruff check aquatts/ tests/
  • wheel build succeeded and contains aquatts/inference/semantic_stability.py
  • real v3 GPU matrix: 4 filler/control texts x 20 paired seeds x Graph/static/dynamic = 240 trials
    • before: 27 collapsed rows; 78/80 text-seed groups differed across modes
    • after: 0 runtime errors, 0 final collapses, 0/80 token-hash mismatches
    • 10 fault seeds were rejected and recovered once in all three modes
    • median semantic time: Graph 0.10 s, static 0.33 s, dynamic 0.33 s
  • end-to-end seed 3003: rejected 600-token candidate (equal/periodic run 186), recovered to 113 tokens, rendered 5.121 s audio

Safety / compatibility

  • no vendored t2s_model.py is restored; the fix targets the latest in-memory upstream overlay
  • no hard-coded language or semantic token IDs
  • guard can be disabled with AQUATTS_SEMANTIC_GUARD=0 for diagnosis
  • invalid candidates are never cached or passed to the vocoder

@Lucas1479
Lucas1479 force-pushed the codex/gsv-semantic-stability branch from a4e90b3 to fdd31a6 Compare August 31, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GPT-SoVITS can produce runaway filler vowels across accelerated KV paths

1 participant