From 0969145073cdca7b3b03499dd049132664e1ac9b Mon Sep 17 00:00:00 2001 From: XXXXRT666 <157766680+XXXXRT666@users.noreply.github.com> Date: Fri, 24 Oct 2025 04:51:14 +0100 Subject: [PATCH] . --- GPT_SoVITS/TTS_infer_pack/TTS.py | 2 +- GPT_SoVITS/inference_webui.py | 4 ++-- install.sh | 7 +++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/GPT_SoVITS/TTS_infer_pack/TTS.py b/GPT_SoVITS/TTS_infer_pack/TTS.py index ef850337..0745d0bc 100644 --- a/GPT_SoVITS/TTS_infer_pack/TTS.py +++ b/GPT_SoVITS/TTS_infer_pack/TTS.py @@ -1316,7 +1316,7 @@ class TTS: rtf_value = sum((t1 - t0, t2 - t1, t_34, t_45)) / sum(audio_len) console.print(f">> Time Stamps: {t1 - t0:.3f}\t{t2 - t1:.3f}\t{t_34:.3f}\t{t_45:.3f}") console.print(f">> Infer Speed: {infer_speed_avg:.2f} Token/s") - console.print(f">> RTF: {rtf_value:.2f}") + console.print(f">> RTF: {rtf_value:.4f}") if ttft_time > 2: console.print(f">> TTFT: {ttft_time:.3f} s") diff --git a/GPT_SoVITS/inference_webui.py b/GPT_SoVITS/inference_webui.py index 77cf9155..05f264c5 100644 --- a/GPT_SoVITS/inference_webui.py +++ b/GPT_SoVITS/inference_webui.py @@ -979,10 +979,10 @@ async def get_tts_wav( console.print(f">> Time Stamps: {t0:.3f}\t{t1:.3f}\t{t2:.3f}\t{t3:.3f}") console.print(f">> Infer Speed: {infer_speed_avg:.2f} Token/s") - console.print(f">> RTF: {rtf_value:.2f}") + console.print(f">> RTF: {rtf_value:.4f}") gr.Info(f"{infer_speed_avg:.2f} Token/s", title="Infer Speed") - gr.Info(f"{rtf_value:.2f}", title="RTF") + gr.Info(f"{rtf_value:.4f}", title="RTF") if ttft_time > 2: console.print(f">> TTFT: {ttft_time:.3f} s") diff --git a/install.sh b/install.sh index 2276ac44..cc72713c 100644 --- a/install.sh +++ b/install.sh @@ -344,6 +344,13 @@ if [ "$USE_CUDA" = true ] && [ "$WORKFLOW" = false ]; then run_pip_quiet torch torchao torchaudio torchcodec --index-url "https://download.pytorch.org/whl/cu126" run_conda_quiet cuda-nvcc=12.6 fi + codec_ver=$(python -m pip show torchcodec 2>/dev/null | awk '/Version:/ {print $2}' | sed 's/+.*//') + audio_ver=$(python -m pip show torchaudio 2>/dev/null | awk '/Version:/ {print $2}' | sed 's/+.*//') + + pip uninstall -y torchcodec torchaudio --quiet + + run_pip_quiet "torchcodec==$codec_ver torchaudio==$audio_ver" + echo -e "${INFO}Installing Flash Attn" run_pip_quiet psutil ninja packaging wheel "setuptools>=42" run_pip_quiet flash-attn -i https://xxxxrt666.github.io/PIP-Index/ --no-build-isolation