fix torch.inference_mode()RuntimeError:Inplace update to inference tensor outside InferenceMode is not allowed.
fix torch.inference_mode()RuntimeError:Inplace update to inference tensor outside InferenceMode is not allowed.
This commit is contained in:
@@ -691,7 +691,7 @@ def get_tts_wav(ref_wav_path, prompt_text, prompt_language, text, text_language,
|
||||
wav_gen = bigvgan_model(cmf_res)
|
||||
audio=wav_gen[0][0]#.cpu().detach().numpy()
|
||||
max_audio=torch.abs(audio).max()#简单防止16bit爆音
|
||||
if max_audio>1:audio/=max_audio
|
||||
if max_audio>1:audio=audio/max_audio
|
||||
audio_opt.append(audio)
|
||||
audio_opt.append(zero_wav_torch)#zero_wav
|
||||
t4 = ttime()
|
||||
|
||||
Reference in New Issue
Block a user