We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 654b0f2 commit 153ccdeCopy full SHA for 153ccde
ChatTTS/core.py
@@ -122,7 +122,10 @@ def _load(
122
assert gpt_ckpt_path, 'gpt_ckpt_path should not be None'
123
gpt.load_state_dict(torch.load(gpt_ckpt_path))
124
if compile and 'cuda' in str(device):
125
- gpt.gpt.forward = torch.compile(gpt.gpt.forward, backend='inductor', dynamic=True)
+ try:
126
+ gpt.gpt.forward = torch.compile(gpt.gpt.forward, backend='inductor', dynamic=True)
127
+ except RuntimeError as e:
128
+ logging.warning(f'Compile failed,{e}. fallback to normal mode.')
129
self.pretrain_models['gpt'] = gpt
130
spk_stat_path = os.path.join(os.path.dirname(gpt_ckpt_path), 'spk_stat.pt')
131
assert os.path.exists(spk_stat_path), f'Missing spk_stat.pt: {spk_stat_path}'
0 commit comments