2 Commits
Author SHA1 Message Date
filliptmandClaude Opus 4.6 9c0c7a2375 Fix weight loading, GQA, codec decoder, and tokenizer for Voxtral TTS
Major fixes:
- Embeddings: use actual checkpoint size (9088 entries with padded codebooks)
- GQA: fix KV head repetition dimension (was interleaving wrong, corrupting
  all attention computations in backbone and acoustic transformer)
- Codec decoder: restructure to flat decoder_blocks[0-7] matching checkpoint,
  use nn.utils.parametrizations.weight_norm, disable conv bias, fix dtype
- Tokenizer: use official mistral_common SpeechRequest API for correct prompt
  format (BOS, BEGIN_AUDIO, AUDIO×N, /INST, text, INST, BEGIN_AUDIO)
- Pipeline: add initial AUDIO token feed before generation loop, fix voice
  embedding injection positions
- Loader: handle folder_paths KeyError gracefully

Status: model loads, generates coherent speech on MPS, codec decodes to
24kHz audio. Text conditioning not yet working correctly — model produces
plausible speech but doesn't follow the input text.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 21:12:10 -05:00
filliptmandClaude Opus 4.6 60f6897263 Initial implementation of Voxtral-4B TTS direct inference for ComfyUI
Custom node pack implementing Mistral's Voxtral-4B-TTS-2603 model with
direct PyTorch inference (no vLLM dependency), enabling native MPS/Mac
support alongside CUDA.

Three-component architecture:
- Mistral LLM backbone (26 layers, 3072 dim, GQA, RoPE)
- Flow-matching acoustic transformer (3 layers, 8-step Euler ODE, CFG)
- Neural audio codec decoder (4-stage ALiBi transformer + conv upsampling)

Features:
- 20 preset voices across 9 languages
- 24 kHz mono output
- BF16/FP16/FP32 dtype support
- HuggingFace Hub auto-download with caching
- ComfyUI AUDIO output format

Nodes:
- FL_VoxtralTTS_ModelLoader: download and load model
- FL_VoxtralTTS_Generate: text + voice → audio

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 20:09:20 -05:00