mirror of
https://github.com/2noise/ChatTTS.git
synced 2026-08-30 17:05:27 +08:00
chore: make lint happy
This commit is contained in:
@@ -62,7 +62,7 @@ def on_audio_seed_change(audio_seed_input):
|
||||
return rand_spk
|
||||
|
||||
|
||||
def load_chat(cust_path: Optional[str], coef: Optional[str], enable_cache = False) -> bool:
|
||||
def load_chat(cust_path: Optional[str], coef: Optional[str], enable_cache = True) -> bool:
|
||||
if cust_path == None:
|
||||
ret = chat.load(coef=coef, enable_cache=enable_cache)
|
||||
else:
|
||||
|
||||
@@ -261,12 +261,12 @@ def main():
|
||||
parser.add_argument("--root_path", type=str, help="root path")
|
||||
parser.add_argument("--custom_path", type=str, help="custom model path")
|
||||
parser.add_argument("--coef", type=str, help="custom dvae coefficient")
|
||||
parser.add_argument("--enable_cache", action="store_true", help="enable model cache")
|
||||
parser.add_argument("--disable_cache", action="store_true", help="enable model cache")
|
||||
args = parser.parse_args()
|
||||
|
||||
logger.info("loading ChatTTS model...")
|
||||
|
||||
if load_chat(args.custom_path, args.coef, args.enable_cache):
|
||||
if load_chat(args.custom_path, args.coef, not args.disable_cache):
|
||||
logger.info("Models loaded successfully.")
|
||||
else:
|
||||
logger.error("Models load failed.")
|
||||
|
||||
Reference in New Issue
Block a user