Undo: Resolve absolute model path

This commit is contained in:
henryruhs
2023-05-30 21:47:59 +02:00
parent f50337f708
commit 98a5111d53
2 changed files with 2 additions and 4 deletions

3
run.py
View File

@@ -61,8 +61,7 @@ def pre_check():
quit(f'Python version is not supported - please upgrade to 3.8 or higher')
if not shutil.which('ffmpeg'):
quit('ffmpeg is not installed!')
model_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'inswapper_128.onnx')
if not os.path.isfile(model_path):
if not os.path.isfile('inswapper_128.onnx'):
quit('File "inswapper_128.onnx" does not exist!')
if '--gpu' in sys.argv:
CUDA_VERSION = torch.version.cuda