[TTS]Add diffusion noise clip to optimize sample result #2902
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR types
Performance optimization
PR changes
Models
Describe
When I use pndm scheduler 25 steps to sample, I found that the generated results are very poor. I found that the default ddpm scheduler sampling comes with noise clip, but pndm scheduler does not. Add the clip_noise option to the diffusion module, users will be able to use faster sampling methods like pndm to generate much better sampling results than when there is no noise clip.
当我使用pndm scheduler 25步进行采样时,发现生成结果效果很差,我发现默认的ddpm scheduler采样自带noise clip,而pndm scheduler没有。往diffusion模块增加clip_noise选项,用户将可以采用像pndm这样更快的采样方式生成相比没有noise clip时好很多的采样结果