Removed deepspeed for MPS

This commit is contained in:
Jose 2023-08-11 16:39:09 +02:00 committed by GitHub
parent bbe3c1550e
commit bde2cc2bff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View file

@ -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

View file

@ -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)

View file

@ -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