2noise / ChatTTS

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

How to use MPS instead of CPU on MacOS? #772

Open yikchunnnn opened 1 month ago

yikchunnnn commented 1 month ago

It seems there is an experimental feature of using MPS, may I know how to turn it on? Thank you for your guidance in advance!

fumiama commented 1 month ago

MPS is slow and has memory leak now so we're not recommending you to use it. You can turn it on by passing experimental=True to Chat.load()

BurnieLiang commented 1 week ago

Errors occur after passing experimental=True to Chat.load() masked_input_ids: torch.Tensor = input_ids[text_mask_inv].to(device) RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)