Overview of F5-TTS Backbone Architectures
mainThe F5-TTS project utilizes three primary backbone architectures for its model implementations: unett.py, dit.py, and mmdit.py. These architectures differ in their structural approach to handling text embeddings, noise, and conditioning.
- unett.py: A flat UNet transformer. It follows the structure used in the E2-TTS and Voicebox papers but utilizes rotary positional embeddings. It supports absolute positional embeddings and ConvNextV2 blocks for embedded text prior to concatenation.
- dit.py: An AdaLN-Zero Diffusion Transformer (DiT). It uses embedded timesteps as conditioning. The input is a concatenation of
noised_input,masked_cond, andembedded_text, followed by a linear projection. It supports absolute positional embeddings, ConvNextV2 blocks for embedded text, and optional long skip connections from the first layer to the last layer. - mmdit.py: A structure based on Stable Diffusion 3 (SD3). It uses timesteps as conditioning and employs a dual-stream approach: a left stream for text embeddings (applying absolute positional embeddings) and a right stream for the concatenation of
masked_condandnoised_input(using the same convolutional positional embeddings asunett).