Compare commits

..
6 Commits
Author SHA1 Message Date
henryruhs 1e3bab9644 Hotfix Geforce 16 series 2025-01-02 22:13:31 +01:00
henryruhs 197773c346 Hotfix Geforce 16 series 2025-01-02 22:03:48 +01:00
henryruhs 8656411336 Bump version 2024-12-31 18:34:51 +01:00
Henry RuhsandGitHub 8efd7c1fa0 Revert CoreML fallbacks (#841) 2024-12-31 18:34:39 +01:00
Henry RuhsandGitHub b48eac30d0 Temporary use the http links 2024-12-29 10:11:59 +01:00
Henry RuhsandGitHub befd75421f Update FUNDING.yml 2024-12-29 01:07:23 +01:00
8 changed files with 27 additions and 6 deletions
+1 -1
View File
@@ -1 +1 @@
custom: [ buymeacoffee.com/henryruhs, ko-fi.com/henryruhs, paypal.me/henryruhs ]
custom: [ buymeacoffee.com/facefusion, ko-fi.com/facefusion ]
+1 -1
View File
@@ -17,7 +17,7 @@ Preview
Installation
------------
Be aware, the [installation](https://docs.facefusion.io/installation) needs technical skills and is not recommended for beginners. In case you are not comfortable using a terminal, our [Windows Installer](https://windows-installer.facefusion.io) and [macOS Installer](https://macos-installer.facefusion.io) get you started.
Be aware, the [installation](https://docs.facefusion.io/installation) needs technical skills and is not recommended for beginners. In case you are not comfortable using a terminal, our [Windows Installer](http://windows-installer.facefusion.io) and [macOS Installer](http://macos-installer.facefusion.io) get you started.
Usage
+9 -1
View File
@@ -34,7 +34,8 @@ def create_inference_execution_providers(execution_device_id : str, execution_pr
if execution_provider == 'cuda':
inference_execution_providers.append((facefusion.choices.execution_provider_set.get(execution_provider),
{
'device_id': execution_device_id
'device_id': execution_device_id,
'cudnn_conv_algo_search': 'DEFAULT' if is_geforce_16_series() else 'EXHAUSTIVE'
}))
if execution_provider == 'tensorrt':
inference_execution_providers.append((facefusion.choices.execution_provider_set.get(execution_provider),
@@ -66,6 +67,13 @@ def create_inference_execution_providers(execution_device_id : str, execution_pr
return inference_execution_providers
def is_geforce_16_series() -> bool:
execution_devices = detect_static_execution_devices()
product_names = ('GeForce GTX 1630', 'GeForce GTX 1650', 'GeForce GTX 1660')
return any(execution_device.get('product').get('name').startswith(product_names) for execution_device in execution_devices)
def run_nvidia_smi() -> subprocess.Popen[bytes]:
commands = [ shutil.which('nvidia-smi'), '--query', '--xml-format' ]
return subprocess.Popen(commands, stdout = subprocess.PIPE)
+1 -1
View File
@@ -89,5 +89,5 @@ def run(program : ArgumentParser) -> None:
subprocess.call([ shutil.which('conda'), 'env', 'config', 'vars', 'set', 'PATH=' + os.pathsep.join(library_paths) ])
if args.onnxruntime in [ 'rocm', 'directml' ]:
if args.onnxruntime in [ 'directml', 'rocm' ]:
subprocess.call([ shutil.which('pip'), 'install', 'numpy==1.26.4', '--force-reinstall' ])
+1 -1
View File
@@ -4,7 +4,7 @@ METADATA =\
{
'name': 'FaceFusion',
'description': 'Industry leading face manipulation platform',
'version': '3.1.0',
'version': '3.1.1',
'license': 'MIT',
'author': 'Henry Ruhs',
'url': 'https://facefusion.io'
@@ -346,6 +346,9 @@ def clear_inference_pool() -> None:
def get_model_options() -> ModelOptions:
face_swapper_model = state_manager.get_item('face_swapper_model')
if has_execution_provider('coreml') and face_swapper_model == 'inswapper_128_fp16':
return create_static_model_set('full').get('inswapper_128')
return create_static_model_set('full').get(face_swapper_model)
@@ -11,6 +11,7 @@ import facefusion.processors.core as processors
from facefusion import config, content_analyser, inference_manager, logger, process_manager, state_manager, wording
from facefusion.common_helper import create_int_metavar
from facefusion.download import conditional_download_hashes, conditional_download_sources, resolve_download_url
from facefusion.execution import has_execution_provider
from facefusion.filesystem import in_directory, is_image, is_video, resolve_relative_path, same_file_extension
from facefusion.processors import choices as processors_choices
from facefusion.processors.typing import FrameEnhancerInputs
@@ -395,6 +396,14 @@ def clear_inference_pool() -> None:
def get_model_options() -> ModelOptions:
frame_enhancer_model = state_manager.get_item('frame_enhancer_model')
if has_execution_provider('coreml'):
if frame_enhancer_model == 'real_esrgan_x2_fp16':
return create_static_model_set('full').get('real_esrgan_x2')
if frame_enhancer_model == 'real_esrgan_x4_fp16':
return create_static_model_set('full').get('real_esrgan_x4')
if frame_enhancer_model == 'real_esrgan_x8_fp16':
return create_static_model_set('full').get('real_esrgan_x8')
return create_static_model_set('full').get(frame_enhancer_model)
+2 -1
View File
@@ -15,7 +15,8 @@ def test_create_inference_execution_providers() -> None:
[
('CUDAExecutionProvider',
{
'device_id': '1'
'device_id': '1',
'cudnn_conv_algo_search': 'EXHAUSTIVE'
}),
'CPUExecutionProvider'
]