From af7ffaf09d6e81fc583587bbb8c661cf306948ae Mon Sep 17 00:00:00 2001 From: manmay nakhashi Date: Sat, 29 Jul 2023 06:26:03 +0530 Subject: [PATCH] add speed ups in read.py --- tortoise/read.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tortoise/read.py b/tortoise/read.py index ff168ba..29aeabf 100644 --- a/tortoise/read.py +++ b/tortoise/read.py @@ -24,9 +24,13 @@ if __name__ == '__main__': 'should only be specified if you have custom checkpoints.', default=MODELS_DIR) parser.add_argument('--seed', type=int, help='Random seed which can be used to reproduce results.', default=None) parser.add_argument('--produce_debug_state', type=bool, help='Whether or not to produce debug_state.pth, which can aid in reproducing problems. Defaults to true.', default=True) + parser.add_argument('--use_deepspeed', type=bool, help='Use deepspeed for speed bump.', default=True) + parser.add_argument('--kv_cache', type=bool, help='If you disable this please wait for a long a time to get the output', default=True) + parser.add_argument('--half', type=bool, help='float16(half) precision inference if True it's faster and take less vram and ram', default=True) + args = parser.parse_args() - tts = TextToSpeech(models_dir=args.model_dir) + tts = TextToSpeech(models_dir=args.model_dir, use_deepspeed=args.use_deepspeed, kv_cache=args.kv_cache, half=args.half) outpath = args.output_path outname = args.output_name