2noise / ChatTTS

A generative speech model for daily dialogue.
https://2noise.com
GNU Affero General Public License v3.0
32.18k stars 3.49k forks source link

How to make CUDA and CPU generate the same speech when given same text? #698

Open pustar opened 2 months ago

pustar commented 2 months ago

Thank you for sharing such nice repo! CUDA and CPU now generate different audio (tone) when given same text. How to make CUDA and CPU generate the same speech (tone) when given same text?

fumiama commented 2 months ago

The random algorithms of CPU and GPU are different so we will get different result. At torch, maybe we can use a custom Generator. See https://pytorch.org/docs/stable/generated/torch.Generator.html#torch.Generator