From 454ed90197e582a9d93d01ae6e64e1914d697f94 Mon Sep 17 00:00:00 2001 From: henryruhs Date: Tue, 4 Aug 2026 13:05:12 +0200 Subject: [PATCH] uninstall every onnxruntime first --- facefusion/installer.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/facefusion/installer.py b/facefusion/installer.py index 037d94a1..bf6acf4b 100644 --- a/facefusion/installer.py +++ b/facefusion/installer.py @@ -55,6 +55,9 @@ def run(program : ArgumentParser) -> None: sys.stdout.write(LOCALES.get('conda_not_activated') + os.linesep) sys.exit(1) + for onnxruntime_package, _ in ONNXRUNTIME_SET.values(): + subprocess.call([ shutil.which('pip'), 'uninstall', onnxruntime_package, '-y', '-q' ], stderr = subprocess.DEVNULL) + commands = [ shutil.which('pip'), 'install' ] if args.force_reinstall: @@ -70,8 +73,4 @@ def run(program : ArgumentParser) -> None: onnxruntime_name, onnxruntime_version = ONNXRUNTIME_SET.get(args.onnxruntime) commands.append(onnxruntime_name + '==' + onnxruntime_version) - - for onnxruntime_package, _ in ONNXRUNTIME_SET.values(): - subprocess.call([ shutil.which('pip'), 'uninstall', onnxruntime_package, '-y', '-q' ]) - subprocess.call(commands)