Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows not yet supported for torch.compile fix #377

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

asamaayako
Copy link
Contributor

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.')

以拦截 平台不支持compile 出现RuntimeError 处理方式继续以普通模式运行并打印log输出原因。

Copy link
Member

@fumiama fumiama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@fumiama fumiama added bug Something isn't working enhancement New feature or request labels Jun 20, 2024
@fumiama fumiama merged commit 153ccde into 2noise:main Jun 20, 2024
zhzLuke96 added a commit to lenML/Speech-AI-Forge that referenced this pull request Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants