From 3702f2ec999c7cf3f0248bc58f681e8a17ec2f91 Mon Sep 17 00:00:00 2001 From: Henry Ruhs Date: Thu, 23 Jul 2026 11:16:00 +0200 Subject: [PATCH] unify the dependency checks in pre_check and add ffprobe (#1181) --- facefusion/core.py | 11 ++++------- facefusion/locales.py | 3 +-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/facefusion/core.py b/facefusion/core.py index c8168c39..303a6628 100755 --- a/facefusion/core.py +++ b/facefusion/core.py @@ -90,13 +90,10 @@ def pre_check() -> bool: logger.error(translator.get('python_not_supported').format(version = '3.10'), __name__) return False - if not shutil.which('curl'): - logger.error(translator.get('curl_not_installed'), __name__) - return False - - if not shutil.which('ffmpeg'): - logger.error(translator.get('ffmpeg_not_installed'), __name__) - return False + for dependency in [ 'curl', 'ffmpeg', 'ffprobe' ]: + if not shutil.which(dependency): + logger.error(translator.get('dependency_not_installed').format(dependency = dependency), __name__) + return False return True diff --git a/facefusion/locales.py b/facefusion/locales.py index 3a5d0b72..a8b31b60 100644 --- a/facefusion/locales.py +++ b/facefusion/locales.py @@ -6,8 +6,7 @@ LOCALES : Locales =\ { 'conda_not_activated': 'conda is not activated', 'python_not_supported': 'python version is not supported, upgrade to {version} or higher', - 'curl_not_installed': 'curl is not installed', - 'ffmpeg_not_installed': 'ffmpeg is not installed', + 'dependency_not_installed': '{dependency} is not installed', 'creating_temp': 'creating temporary resources', 'extracting_frames': 'extracting frames with a resolution of {resolution} and {fps} frames per second', 'extracting_frames_succeeded': 'extracting frames succeeded',