EveryVoiceTTS / EveryVoiceTTS/EveryVoice
[FastSpeech2] Variance can be None but it is used in `forward()`
- Dominant language
- Python
- Stars
- 45
- Forks
- 4
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 14
Description
FastSpeech2's variance adaptor can be set to None and later we try to use it in the forward pass.
1. When constructing a `FastSpeech2()`, on line https://github.com/roedoejet/FastSpeech2_lightning/blob/main/fs2/model.py#L33 we expect a `stats` and by default it is `None`.
2. We keep a reference to `stats` https://github.com/roedoejet/FastSpeech2_lightning/blob/main/fs2/model.py#L49.
3. If `stats` is `None` on line https://github.com/roedoejet/FastSpeech2_lightning/blob/main/fs2/model.py#L79, we set the `variance_adaptor` to `None` at line https://github.com/roedoejet/FastSpeech2_lightning/blob/main/fs2/model.py#L84. We then log an error.
5. During the `forward()` pass, we calculate variance at line https://github.com/roedoejet/FastSpeech2_lightning/blob/main/fs2/model.py#L162 regardless if the member is `None`
What should happen when the variance is not set?
Contributor guide
Assessment
This issue has not been assessed yet.