Environment*
- Platform: macOS, Apple Silicon (M-series)
- ComfyUI: Desktop app, version 0.31.0
- Engine: ChatterBox Official 23-Lang Engine, language = Russian
Summary
Generating Russian speech with the ChatterBox 23-Lang engine produces two different failure modes depending on device setting, both pointing to the same root cause: the Russian model's generated speech tokens exceed the vocabulary size of the s3gen flow decoder's embedding table.
On device=cpu: Hard crash with IndexError during generation.
On device=mps: No crash — generation "succeeds" and returns audio of the expected duration, but the output is unintelligible gibberish (correct prosody/expression, but no real phonetic content in any language). This is consistent with MPS's embedding kernel skipping bounds-checking that CPU enforces — the same out-of-range token issue, just silently corrupting output instead of raising an exception.
Steps to reproduce
- Add "ChatterBox Official 23-Lang Engine" node, set language to Russian
- Add "TTS Text" node, connect Engine output
- Provide a clean reference voice sample (tested with two different samples — a personal recording and a separate professional voice sample — same result both times, ruling out reference audio as the cause)
- Provide matching Russian reference text transcript
- Set device=cpu → crash. Set device=mps → completes but output is gibberish.
CPU traceback
IndexError: index out of range in self
File ".../engines/chatterbox/models/s3gen/flow.py", line 218, in inference
token = self.input_embedding(torch.clamp(token, min=0)) * mask
File ".../torch/nn/functional.py", line 2567, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
IndexError: index out of range in self
Full traceback available on request — happy to paste more context.
Notes
- Re-downloaded the Russian model files fresh (t3_cfg.safetensors, tokenizer.json, s3gen.safetensors, ve.safetensors, conds.pt) to rule out a corrupted download — same result.
- Ruled out text encoding (confirmed clean UTF-8 Cyrillic) and reference audio format (44.1kHz mono WAV, clean recording) as causes.
- Suspect the Russian language pack's tokenizer/vocab doesn't match the s3gen flow model's embedding table size for this checkpoint.
Environment*
Summary
Generating Russian speech with the ChatterBox 23-Lang engine produces two different failure modes depending on device setting, both pointing to the same root cause: the Russian model's generated speech tokens exceed the vocabulary size of the s3gen flow decoder's embedding table.
On device=cpu: Hard crash with IndexError during generation.
On device=mps: No crash — generation "succeeds" and returns audio of the expected duration, but the output is unintelligible gibberish (correct prosody/expression, but no real phonetic content in any language). This is consistent with MPS's embedding kernel skipping bounds-checking that CPU enforces — the same out-of-range token issue, just silently corrupting output instead of raising an exception.
Steps to reproduce
CPU traceback
IndexError: index out of range in self
File ".../engines/chatterbox/models/s3gen/flow.py", line 218, in inference
token = self.input_embedding(torch.clamp(token, min=0)) * mask
File ".../torch/nn/functional.py", line 2567, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
IndexError: index out of range in self
Full traceback available on request — happy to paste more context.
Notes