From 271db6a4de432726b288942edd7e73ac44decb66 Mon Sep 17 00:00:00 2001 From: RVC-Boss <129054828+RVC-Boss@users.noreply.github.com> Date: Wed, 5 Mar 2025 18:07:47 +0800 Subject: [PATCH] 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. --- GPT_SoVITS/inference_webui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPT_SoVITS/inference_webui.py b/GPT_SoVITS/inference_webui.py index e5a8a60..afae2cf 100644 --- a/GPT_SoVITS/inference_webui.py +++ b/GPT_SoVITS/inference_webui.py @@ -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()