2noise / ChatTTS

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

windows 不支持compile 问题 #376

Closed asamaayako closed 2 weeks ago

asamaayako commented 2 weeks ago

Windows not yet supported for torch.compile 报错位置 ChatTTS->core.py->125: gpt.gpt.forward = torch.compile(gpt.gpt.forward, backend='inductor', dynamic=True)

 if compile and 'cuda' in str(device):
                gpt.gpt.forward = torch.compile(gpt.gpt.forward,  backend='inductor', dynamic=True)

希望修改为

      if compile and 'cuda' in str(device):
          try:
              gpt.gpt.forward = torch.compile(gpt.gpt.forward, backend='inductor', dynamic=True)
          except RuntimeError as e:
              logging.warning(f'Compile failed,{e}. fallback to normal mode.')

如果有大佬看见可以去改一下吗 默默念:GitHub不会玩 pr怎么提