This commit is contained in:
XXXXRT666 2025-10-24 04:51:14 +01:00
parent 0651cb5d01
commit 0969145073
3 changed files with 10 additions and 3 deletions

View File

@ -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")

View File

@ -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")

View File

@ -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