From bde2cc2bff2ddc3a2ead0e5ec0d078d16749da6d Mon Sep 17 00:00:00 2001 From: Jose <34888496+Jerry-Master@users.noreply.github.com> Date: Fri, 11 Aug 2023 16:39:09 +0200 Subject: [PATCH] Removed deepspeed for MPS --- README.md | 4 ++-- tortoise/do_tts.py | 2 ++ tortoise/read.py | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f6b1725..8da668d 100644 --- a/README.md +++ b/README.md @@ -108,8 +108,8 @@ cd tortoise-tts pip install . ``` -Be aware that the code does not work with DeepSpeed, try to avoid using the flag `--use_deepspeed` in the commands below. -Also, mixed precision is not supported on MPS so don't use the `--half` flag either. +Be aware that DeepSpeed is disabled on Apple Silicon since it does not work. The flag `--use_deepspeed` is ignored. + ### do_tts.py diff --git a/tortoise/do_tts.py b/tortoise/do_tts.py index 39acab3..2f0e562 100644 --- a/tortoise/do_tts.py +++ b/tortoise/do_tts.py @@ -25,6 +25,8 @@ if __name__ == '__main__': parser.add_argument('--cvvp_amount', type=float, help='How much the CVVP model should influence the output.' 'Increasing this can in some cases reduce the likelihood of multiple speakers. Defaults to 0 (disabled)', default=.0) args = parser.parse_args() + if torch.backends.mps.is_available(): + args.use_deepspeed = False os.makedirs(args.output_path, exist_ok=True) tts = TextToSpeech(models_dir=args.model_dir, use_deepspeed=args.use_deepspeed, kv_cache=args.kv_cache, half=args.half) diff --git a/tortoise/read.py b/tortoise/read.py index ab31bae..e5839aa 100644 --- a/tortoise/read.py +++ b/tortoise/read.py @@ -30,6 +30,8 @@ if __name__ == '__main__': args = parser.parse_args() + if torch.backends.mps.is_available(): + args.use_deepspeed = False tts = TextToSpeech(models_dir=args.model_dir, use_deepspeed=args.use_deepspeed, kv_cache=args.kv_cache, half=args.half) outpath = args.output_path