Industry leading face manipulation platform
CPU is faster then CoreML
henryruhs7e6c97d275e2
diff --git a/facefusion/content_analyser.py b/facefusion/content_analyser.pyindex 18e0367a..bc2d86b7 100644--- a/facefusion/content_analyser.py+++ b/facefusion/content_analyser.py@@ -1,14 +1,15 @@from functools import lru_cache-from typing import Tuple+from typing import List, Tupleimport numpyfrom tqdm import tqdmfrom facefusion import inference_manager, state_manager, wordingfrom facefusion.download import conditional_download_hashes, conditional_download_sources, resolve_download_url+from facefusion.execution import has_execution_providerfrom facefusion.filesystem import resolve_relative_pathfrom facefusion.thread_helper import conditional_thread_semaphore-from facefusion.types import Detection, DownloadScope, DownloadSet, Fps, InferencePool, ModelSet, VisionFrame+from facefusion.types import Detection, DownloadScope, DownloadSet, ExecutionProvider, Fps, InferencePool, ModelSet, VisionFramefrom facefusion.vision import detect_video_fps, fit_frame, read_image, read_video_frameSTREAM_COUNTER = 0@@ -102,6 +103,12 @@ def clear_inference_pool() -> None:inference_manager.clear_inference_pool(__name__, model_names)+def resolve_execution_providers() -> List[ExecutionProvider]:+ if has_execution_provider('coreml'):+ return [ 'cpu' ]+ return state_manager.get_item('execution_providers')++def collect_model_downloads() -> Tuple[DownloadSet, DownloadSet]:model_set = create_static_model_set('full')model_hash_set = {}