2noise / ChatTTS

A generative speech model for daily dialogue.
https://2noise.com
Other
26.58k stars 2.89k forks source link

"Compile” doesn't work on GPU #479

Open encorechow opened 3 days ago

encorechow commented 3 days ago

pytorch version: 2.3.1+cu121

I've tried to use compile=True in load function, it is super slow to generate results, and I didn't see any GPU utilizition with nvidia-smi like below (a liitle memory ocuupied like 1GB): 企业微信截图_17194899582803

after I commented out the code block below, GPU utilization turns normal, and result is generated much much faster: 企业微信截图_17194900322602 企业微信截图_17194900872413

I cant understand why the torch.compile function didn't work well. Does anyone know why?

fumiama commented 3 days ago

The compile only shows its effect when you run a generating process continuously with the same input shape. If you only run it once, it will slow down the generation.