Industry leading face manipulation platform
Use latest onnxruntime and enable model cache for CoreML
henryruhsbb5504c7a45b
diff --git a/facefusion/execution.py b/facefusion/execution.pyindex 66cd6410..2fc5ae8d 100644--- a/facefusion/execution.py+++ b/facefusion/execution.py@@ -60,7 +60,10 @@ def create_inference_session_providers(execution_device_id : str, execution_prov'precision': 'FP32'}))if execution_provider == 'coreml':- inference_session_providers.append(facefusion.choices.execution_provider_set.get(execution_provider))+ inference_session_providers.append((facefusion.choices.execution_provider_set.get(execution_provider),+ {+ 'ModelCacheDirectory': '.caches'+ }))if 'cpu' in execution_providers:inference_session_providers.append(facefusion.choices.execution_provider_set.get('cpu'))diff --git a/facefusion/installer.py b/facefusion/installer.pyindex ee84b572..df868c7b 100644--- a/facefusion/installer.py+++ b/facefusion/installer.py@@ -10,10 +10,10 @@ from facefusion.common_helper import is_linux, is_windowsONNXRUNTIME_SET =\{- 'default': ('onnxruntime', '1.20.1')+ 'default': ('onnxruntime', '1.21.0')}if is_windows() or is_linux():- ONNXRUNTIME_SET['cuda'] = ('onnxruntime-gpu', '1.20.1')+ ONNXRUNTIME_SET['cuda'] = ('onnxruntime-gpu', '1.21.0')ONNXRUNTIME_SET['openvino'] = ('onnxruntime-openvino', '1.20.0')if is_windows():ONNXRUNTIME_SET['directml'] = ('onnxruntime-directml', '1.17.3')@@ -51,7 +51,7 @@ def run(program : ArgumentParser) -> None:if python_id in [ 'cp310', 'cp312' ]:wheel_name = 'onnxruntime_rocm-' + onnxruntime_version + '-' + python_id + '-' + python_id + '-linux_x86_64.whl'- wheel_url = 'https://repo.radeon.com/rocm/manylinux/rocm-rel-6.3.1/' + wheel_name+ wheel_url = 'https://repo.radeon.com/rocm/manylinux/rocm-rel-6.3.4/' + wheel_namesubprocess.call([ shutil.which('pip'), 'install', wheel_url, '--force-reinstall' ])else:subprocess.call([ shutil.which('pip'), 'install', onnxruntime_name + '==' + onnxruntime_version, '--force-reinstall' ])diff --git a/requirements.txt b/requirements.txtindex 5aa8f06c..6e723314 100644--- a/requirements.txt+++ b/requirements.txt@@ -2,7 +2,7 @@ gradio==5.20.0gradio-rangeslider==0.0.8numpy==2.2.3onnx==1.17.0-onnxruntime==1.20.1+onnxruntime==1.21.0opencv-python==4.11.0.86psutil==7.0.0tqdm==4.67.1