Merge branch 'master' into dev

This commit is contained in:
litagin02
2024-02-27 13:44:57 +09:00
2 changed files with 4 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ chcp 65001 > NUL
@echo off @echo off
pushd %~dp0 pushd %~dp0
echo Running server_editor.py --inbroser echo Running server_editor.py --inbrowser
venv\Scripts\python server_editor.py --inbrowser venv\Scripts\python server_editor.py --inbrowser
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )

View File

@@ -2,6 +2,7 @@ import argparse
import json import json
import os import os
import sys import sys
from pathlib import Path
import gradio as gr import gradio as gr
import numpy as np import numpy as np
@@ -27,7 +28,7 @@ with open(os.path.join("configs", "paths.yml"), "r", encoding="utf-8") as f:
# dataset_root = path_config["dataset_root"] # dataset_root = path_config["dataset_root"]
assets_root = path_config["assets_root"] assets_root = path_config["assets_root"]
model_holder = ModelHolder(assets_root, device) model_holder = ModelHolder(Path(assets_root), device)
def merge_style(model_name_a, model_name_b, weight, output_name, style_triple_list): def merge_style(model_name_a, model_name_b, weight, output_name, style_triple_list):
@@ -226,7 +227,7 @@ def simple_tts(model_name, text, style=DEFAULT_STYLE, style_weight=1.0):
config_path = os.path.join(assets_root, model_name, "config.json") config_path = os.path.join(assets_root, model_name, "config.json")
style_vec_path = os.path.join(assets_root, model_name, "style_vectors.npy") style_vec_path = os.path.join(assets_root, model_name, "style_vectors.npy")
model = Model(model_path, config_path, style_vec_path, device) model = Model(Path(model_path), Path(config_path), Path(style_vec_path), device)
return model.infer(text, style=style, style_weight=style_weight) return model.infer(text, style=style, style_weight=style_weight)