mirror of
https://github.com/facefusion/facefusion.git
synced 2026-07-28 21:08:54 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4fba8421f | ||
|
|
1e3bab9644 | ||
|
|
197773c346 | ||
|
|
8656411336 | ||
|
|
8efd7c1fa0 | ||
|
|
b48eac30d0 | ||
|
|
befd75421f |
+1
-1
@@ -1 +1 @@
|
||||
custom: [ buymeacoffee.com/henryruhs, ko-fi.com/henryruhs, paypal.me/henryruhs ]
|
||||
custom: [ buymeacoffee.com/facefusion, ko-fi.com/facefusion ]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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' ])
|
||||
|
||||
@@ -4,7 +4,7 @@ METADATA =\
|
||||
{
|
||||
'name': 'FaceFusion',
|
||||
'description': 'Industry leading face manipulation platform',
|
||||
'version': '3.1.0',
|
||||
'version': '3.1.2',
|
||||
'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)
|
||||
|
||||
|
||||
|
||||
@@ -6,5 +6,6 @@ onnx==1.17.0
|
||||
onnxruntime==1.20.1
|
||||
opencv-python==4.10.0.84
|
||||
psutil==6.1.1
|
||||
pydantic==2.10.6
|
||||
tqdm==4.67.1
|
||||
scipy==1.14.1
|
||||
|
||||
@@ -15,7 +15,8 @@ def test_create_inference_execution_providers() -> None:
|
||||
[
|
||||
('CUDAExecutionProvider',
|
||||
{
|
||||
'device_id': '1'
|
||||
'device_id': '1',
|
||||
'cudnn_conv_algo_search': 'EXHAUSTIVE'
|
||||
}),
|
||||
'CPUExecutionProvider'
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user