ProDiffOptions
Options & Configuration · AiDotNet.TextToSpeech.Classic
Options for ProDiff (Huang et al. 2022): FastSpeech 2’s encoder and variance adaptor with a generator-based diffusion denoiser, distilled from a 4-step teacher into a 2-step model.
Inheritance: ModelOptions → TtsModelOptions → AcousticModelOptions → ProDiffOptions
For Beginners
These options configure the ProDiff model. Default values follow the original paper settings.
How It Works
Defaults are the paper’s (§4, §6.1, Table 4) with the values it leaves to its reference implementation
(Rongjiehuang/ProDiff, modules/ProDiff/config, egs/egs_bases/tts): phoneme embedding 256, a 3-layer
encoder pre-net, 4 FFT blocks (2 heads, filter 1024, kernels 9 and 1, dropout 0.05) and a final linear projection;
variance predictors kernel 3, filter 256, dropout 0.5; pitch lookup table 300; a denoiser of 20 residual layers,
256 channels, kernel 3, no dilation; a cosine noise schedule; a 4-step teacher distilled into 2 steps; variance
losses weighted 0.1; Adam with β = (0.9, 0.98), ε = 1e-9 on the inverse-square-root schedule (factor 2, 2000 warmup
steps) and gradient-norm clip 1; 22.05 kHz, 1024-point STFT, hop 256, 80 mel bins.
Constructors
| Constructor | Summary |
|---|---|
ProDiffOptions() |
Creates the paper’s configuration. |
ProDiffOptions(ProDiffOptions other) |
Initializes a new instance by copying from another instance. |
Properties
| Property | Summary |
|---|---|
double CosineScheduleOffset { get; set; } |
Gets or sets the cosine schedule’s offset s (0.008, Nichol and Dhariwal 2021). |
double MaxGradientNorm { get; set; } |
Gets or sets the global gradient-norm clip (1; 0 disables). |
double OptimizerBeta1 { get; set; } |
Gets or sets Adam’s β₁ (0.9). |
double OptimizerBeta2 { get; set; } |
Gets or sets Adam’s β₂ (0.98). |
double OptimizerEpsilon { get; set; } |
Gets or sets Adam’s ε (1e-9, §6.1). |
double PitchMaxHz { get; set; } |
Gets or sets the highest quantized pitch in Hz (800). |
double PitchMinHz { get; set; } |
Gets or sets the lowest quantized pitch in Hz (71, FastSpeech 2’s range). |
double VarianceLossWeight { get; set; } |
Gets or sets the weight on each variance loss (0.1, §4.5). |
double VariancePredictorDropout { get; set; } |
Gets or sets the variance predictors’ dropout (0.5). |
int DenoiserChannels { get; set; } |
Gets or sets the denoiser’s residual channels (256). |
int DenoiserDilationCycle { get; set; } |
Gets or sets the denoiser’s dilation cycle (1: no dilation). |
int DenoiserLayers { get; set; } |
Gets or sets the denoiser’s residual layers N (20). |
int FftFilterSize { get; set; } |
Gets or sets the FFT blocks’ convolutional filter (1024). |
int NumDiffusionSteps { get; set; } |
Gets or sets the distilled model’s diffusion steps T₂ (2). |
int NumEnergyBins { get; set; } |
Gets or sets the energy embedding’s bins (256). |
int NumPitchBins { get; set; } |
Gets or sets the pitch embedding’s lookup-table size (300, §6.1). |
int PrenetKernelSize { get; set; } |
Gets or sets the encoder pre-net’s kernel (5). |
int PrenetLayers { get; set; } |
Gets or sets the encoder pre-net’s convolutions (3, Table 4). |
int SamplingSeed { get; set; } |
Gets or sets the seed of the training draws and the sampling noise, for repeatable runs. |
int TeacherDiffusionSteps { get; set; } |
Gets or sets the teacher’s diffusion steps T₁ (4); a multiple of NumDiffusionSteps. |
int VariancePredictorFilterSize { get; set; } |
Gets or sets the variance predictors’ filter (256). |
int VariancePredictorKernelSize { get; set; } |
Gets or sets the variance predictors’ kernel (3). |
int WarmupSteps { get; set; } |
Gets or sets the inverse-square-root schedule’s warmup steps (2000). |
int[] FftKernelSizes { get; set; } |
Gets or sets the FFT blocks’ two convolution kernels (9, 1). |