From 763682ddf7abf2aebc13db73528996c8aad2979f Mon Sep 17 00:00:00 2001 From: tsukumi Date: Sun, 10 Nov 2024 13:19:27 +0900 Subject: [PATCH] =?UTF-8?q?Update:=20=E3=83=A2=E3=83=87=E3=83=AB=E3=81=AE?= =?UTF-8?q?=E3=83=AD=E3=83=BC=E3=83=89=E6=99=82=E9=96=93=E3=82=92=E6=98=8E?= =?UTF-8?q?=E7=A4=BA=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- voicevox_engine/tts_pipeline/style_bert_vits2_tts_engine.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/voicevox_engine/tts_pipeline/style_bert_vits2_tts_engine.py b/voicevox_engine/tts_pipeline/style_bert_vits2_tts_engine.py index 32646493..dd44e306 100644 --- a/voicevox_engine/tts_pipeline/style_bert_vits2_tts_engine.py +++ b/voicevox_engine/tts_pipeline/style_bert_vits2_tts_engine.py @@ -112,6 +112,7 @@ def __init__( # 音声合成に必要な BERT モデル・トークナイザーを読み込む ## 一度ロードすればプロセス内でグローバルに保持される + start_time = time.time() logger.info("Loading BERT model and tokenizer...") onnx_bert_models.load_model( language=Languages.JP, @@ -124,7 +125,7 @@ def __init__( pretrained_model_name_or_path="tsukumijima/deberta-v2-large-japanese-char-wwm-onnx", cache_dir=str(self.BERT_MODEL_CACHE_DIR), ) - logger.info("BERT model and tokenizer loaded.") + logger.info(f"BERT model and tokenizer loaded. ({time.time() - start_time:.2f}s)") # load_all_models が True の場合は全ての音声合成モデルをロードしておく if load_all_models is True: @@ -208,8 +209,9 @@ def load_model(self, aivm_uuid: str) -> TTSModel: # ONNX 推論で利用する ExecutionProvider を指定 onnx_providers=self.onnx_providers, ) # fmt: skip + start_time = time.time() tts_model.load() - logger.info(f"{aivm_info.manifest.name} ({aivm_uuid}) loaded.") + logger.info(f"{aivm_info.manifest.name} ({aivm_uuid}) loaded. ({time.time() - start_time:.2f}s)") self.tts_models[aivm_uuid] = tts_model return tts_model