From 12cc9f6686c98047a48662025350f30d81726c7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Sat, 22 Jun 2024 15:03:13 +0900 Subject: [PATCH] chore: unify file names in utils (#402) --- ChatTTS/core.py | 4 ++-- ChatTTS/infer/api.py | 2 +- ChatTTS/utils/{gpu_utils.py => gpu.py} | 0 ChatTTS/utils/{infer_utils.py => infer.py} | 0 4 files changed, 3 insertions(+), 3 deletions(-) rename ChatTTS/utils/{gpu_utils.py => gpu.py} (100%) rename ChatTTS/utils/{infer_utils.py => infer.py} (100%) diff --git a/ChatTTS/core.py b/ChatTTS/core.py index a2f78d520..7204a55ba 100644 --- a/ChatTTS/core.py +++ b/ChatTTS/core.py @@ -12,8 +12,8 @@ from .model.dvae import DVAE from .model.gpt import GPT_warpper -from .utils.gpu_utils import select_device -from .utils.infer_utils import count_invalid_characters, detect_language, apply_character_map, apply_half2full_map, HomophonesReplacer +from .utils.gpu import select_device +from .utils.infer import count_invalid_characters, detect_language, apply_character_map, apply_half2full_map, HomophonesReplacer from .utils.io import get_latest_modified_file, del_all from .infer.api import refine_text, infer_code from .utils.download import check_all_assets, download_all_assets diff --git a/ChatTTS/infer/api.py b/ChatTTS/infer/api.py index 0f6fade10..bcc5419a4 100644 --- a/ChatTTS/infer/api.py +++ b/ChatTTS/infer/api.py @@ -3,7 +3,7 @@ import torch.nn.functional as F from transformers.generation import TopKLogitsWarper, TopPLogitsWarper -from ..utils.infer_utils import CustomRepetitionPenaltyLogitsProcessorRepeat +from ..utils.infer import CustomRepetitionPenaltyLogitsProcessorRepeat from ..utils.io import del_all from ..model.gpt import GPT_warpper diff --git a/ChatTTS/utils/gpu_utils.py b/ChatTTS/utils/gpu.py similarity index 100% rename from ChatTTS/utils/gpu_utils.py rename to ChatTTS/utils/gpu.py diff --git a/ChatTTS/utils/infer_utils.py b/ChatTTS/utils/infer.py similarity index 100% rename from ChatTTS/utils/infer_utils.py rename to ChatTTS/utils/infer.py