From 14c68053374e6b968c9c45c0e7b8350effd68a5b Mon Sep 17 00:00:00 2001 From: litagin02 Date: Fri, 15 Mar 2024 21:36:53 +0900 Subject: [PATCH] Update hatch setting and fmt --- preprocess_text.py | 1 + pyproject.toml | 6 +++--- webui/dataset.py | 6 +++++- webui/style_vectors.py | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/preprocess_text.py b/preprocess_text.py index c75e230..a65a1d6 100644 --- a/preprocess_text.py +++ b/preprocess_text.py @@ -14,6 +14,7 @@ from style_bert_vits2.nlp.japanese import pyopenjtalk_worker from style_bert_vits2.nlp.japanese.user_dict import update_dict from style_bert_vits2.utils.stdout_wrapper import SAFE_STDOUT + # このプロセスからはワーカーを起動して辞書を使いたいので、ここで初期化 pyopenjtalk_worker.initialize_worker() diff --git a/pyproject.toml b/pyproject.toml index 3045f03..2d26680 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ 'pyworld-prebuilt', 'safetensors', 'scipy', - 'torch>=2.1,<2.2', + 'torch>=2.1', 'transformers', ] @@ -102,11 +102,11 @@ dependencies = [ [tool.hatch.envs.style.scripts] check = [ "black --check --diff .", - "isort --check-only --diff --profile black --gitignore --lai 2 .", + "isort --check-only --diff --profile black --gitignore --lai 2 . --sg \"Data/*\" --sg \"inputs/*\" --sg \"model_assets/*\" --sg \"static/*\"", ] fmt = [ "black .", - "isort --profile black --gitignore --lai 2 .", + "isort --profile black --gitignore --lai 2 . --sg \"Data/*\" --sg \"inputs/*\" --sg \"model_assets/*\" --sg \"static/*\"", "check", ] diff --git a/webui/dataset.py b/webui/dataset.py index 33da3ff..21b1063 100644 --- a/webui/dataset.py +++ b/webui/dataset.py @@ -236,7 +236,11 @@ def create_dataset_app() -> gr.Blocks: outputs=[result2], ) use_hf_whisper.change( - lambda x: (gr.update(visible=x), gr.update(visible=not x), gr.update(visible=not x)), + lambda x: ( + gr.update(visible=x), + gr.update(visible=not x), + gr.update(visible=not x), + ), inputs=[use_hf_whisper], outputs=[batch_size, compute_type, device], ) diff --git a/webui/style_vectors.py b/webui/style_vectors.py index e125c3f..05056eb 100644 --- a/webui/style_vectors.py +++ b/webui/style_vectors.py @@ -6,12 +6,12 @@ import gradio as gr import matplotlib.pyplot as plt import numpy as np import yaml -from config import config from scipy.spatial.distance import pdist, squareform from sklearn.cluster import DBSCAN, AgglomerativeClustering, KMeans from sklearn.manifold import TSNE from umap import UMAP +from config import config from style_bert_vits2.constants import DEFAULT_STYLE, GRADIO_THEME from style_bert_vits2.logging import logger