From ed2bf00d69cbbe8c9be16e2d80bd8834ae1c74c1 Mon Sep 17 00:00:00 2001 From: Somdev Sangwan Date: Tue, 30 May 2023 08:11:11 +0530 Subject: [PATCH] fix #69 --- run.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/run.py b/run.py index 9ad2a13..cf05641 100755 --- a/run.py +++ b/run.py @@ -9,10 +9,9 @@ if not shutil.which('ffmpeg'): quit() if '--gpu' not in sys.argv: core.globals.providers = ['CPUExecutionProvider'] - -if 'ROCMExecutionProvider' not in core.globals.providers: +else if 'ROCMExecutionProvider' not in core.globals.providers: import torch - if not torch.cuda.is_available(): + if not torch.cuda.is_available() and args['gpu']: quit("You are using --gpu flag but CUDA isn't available on your system.") import glob