diff --git a/facefusion.ini b/facefusion.ini index 30eaf786..52b2328a 100644 --- a/facefusion.ini +++ b/facefusion.ini @@ -103,7 +103,6 @@ execution_queue_count = [download] download_providers = -skip_download = [memory] video_memory_strategy = diff --git a/facefusion/args.py b/facefusion/args.py index 114575bb..266be649 100644 --- a/facefusion/args.py +++ b/facefusion/args.py @@ -120,7 +120,6 @@ def apply_args(args : Args, apply_state_item : ApplyStateItem) -> None: apply_state_item('execution_queue_count', args.get('execution_queue_count')) # download apply_state_item('download_providers', args.get('download_providers')) - apply_state_item('skip_download', args.get('skip_download')) # memory apply_state_item('video_memory_strategy', args.get('video_memory_strategy')) apply_state_item('system_memory_limit', args.get('system_memory_limit')) diff --git a/facefusion/content_analyser.py b/facefusion/content_analyser.py index 2f1853bc..34346283 100644 --- a/facefusion/content_analyser.py +++ b/facefusion/content_analyser.py @@ -5,7 +5,7 @@ import numpy from tqdm import tqdm from facefusion import inference_manager, state_manager, wording -from facefusion.download import conditional_download_hashes, conditional_download_sources +from facefusion.download import conditional_download_hashes, conditional_download_sources, resolve_download_url from facefusion.filesystem import resolve_relative_path from facefusion.thread_helper import conditional_thread_semaphore from facefusion.typing import Fps, InferencePool, ModelOptions, ModelSet, VisionFrame @@ -26,7 +26,7 @@ def create_static_model_set() -> ModelSet: { 'content_analyser': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/open_nsfw.hash', + 'url': resolve_download_url('models-3.0.0', 'open_nsfw.hash'), 'path': resolve_relative_path('../.assets/models/open_nsfw.hash') } }, @@ -34,7 +34,7 @@ def create_static_model_set() -> ModelSet: { 'content_analyser': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/open_nsfw.onnx', + 'url': resolve_download_url('models-3.0.0', 'open_nsfw.onnx'), 'path': resolve_relative_path('../.assets/models/open_nsfw.onnx') } }, diff --git a/facefusion/download.py b/facefusion/download.py index cee231f8..3dd35fc6 100644 --- a/facefusion/download.py +++ b/facefusion/download.py @@ -52,14 +52,13 @@ def conditional_download_hashes(hashes : DownloadSet) -> bool: hash_paths = [ hashes.get(hash_key).get('path') for hash_key in hashes.keys() ] process_manager.check() - if not state_manager.get_item('skip_download'): - _, invalid_hash_paths = validate_hash_paths(hash_paths) - if invalid_hash_paths: - for index in hashes: - if hashes.get(index).get('path') in invalid_hash_paths: - invalid_hash_url = hashes.get(index).get('url') - download_directory_path = os.path.dirname(hashes.get(index).get('path')) - conditional_download(download_directory_path, [ invalid_hash_url ]) + _, invalid_hash_paths = validate_hash_paths(hash_paths) + if invalid_hash_paths: + for index in hashes: + if hashes.get(index).get('path') in invalid_hash_paths: + invalid_hash_url = hashes.get(index).get('url') + download_directory_path = os.path.dirname(hashes.get(index).get('path')) + conditional_download(download_directory_path, [ invalid_hash_url ]) valid_hash_paths, invalid_hash_paths = validate_hash_paths(hash_paths) for valid_hash_path in valid_hash_paths: @@ -78,14 +77,13 @@ def conditional_download_sources(sources : DownloadSet) -> bool: source_paths = [ sources.get(source_key).get('path') for source_key in sources.keys() ] process_manager.check() - if not state_manager.get_item('skip_download'): - _, invalid_source_paths = validate_source_paths(source_paths) - if invalid_source_paths: - for index in sources: - if sources.get(index).get('path') in invalid_source_paths: - invalid_source_url = sources.get(index).get('url') - download_directory_path = os.path.dirname(sources.get(index).get('path')) - conditional_download(download_directory_path, [ invalid_source_url ]) + _, invalid_source_paths = validate_source_paths(source_paths) + if invalid_source_paths: + for index in sources: + if sources.get(index).get('path') in invalid_source_paths: + invalid_source_url = sources.get(index).get('url') + download_directory_path = os.path.dirname(sources.get(index).get('path')) + conditional_download(download_directory_path, [ invalid_source_url ]) valid_source_paths, invalid_source_paths = validate_source_paths(source_paths) for valid_source_path in valid_source_paths: diff --git a/facefusion/face_classifier.py b/facefusion/face_classifier.py index eb011fcb..cd49c8a8 100644 --- a/facefusion/face_classifier.py +++ b/facefusion/face_classifier.py @@ -4,7 +4,7 @@ from typing import List, Tuple import numpy from facefusion import inference_manager -from facefusion.download import conditional_download_hashes, conditional_download_sources +from facefusion.download import conditional_download_hashes, conditional_download_sources, resolve_download_url from facefusion.face_helper import warp_face_by_face_landmark_5 from facefusion.filesystem import resolve_relative_path from facefusion.thread_helper import conditional_thread_semaphore @@ -21,7 +21,7 @@ def create_static_model_set() -> ModelSet: { 'face_classifier': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/fairface.hash', + 'url': resolve_download_url('models-3.0.0', 'fairface.hash'), 'path': resolve_relative_path('../.assets/models/fairface.hash') } }, @@ -29,7 +29,7 @@ def create_static_model_set() -> ModelSet: { 'face_classifier': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/fairface.onnx', + 'url': resolve_download_url('models-3.0.0', 'fairface.onnx'), 'path': resolve_relative_path('../.assets/models/fairface.onnx') } }, diff --git a/facefusion/face_detector.py b/facefusion/face_detector.py index c66dc75d..4c82220b 100644 --- a/facefusion/face_detector.py +++ b/facefusion/face_detector.py @@ -5,7 +5,7 @@ import numpy from charset_normalizer.md import lru_cache from facefusion import inference_manager, state_manager -from facefusion.download import conditional_download_hashes, conditional_download_sources +from facefusion.download import conditional_download_hashes, conditional_download_sources, resolve_download_url from facefusion.face_helper import create_rotated_matrix_and_size, create_static_anchors, distance_to_bounding_box, distance_to_face_landmark_5, normalize_bounding_box, transform_bounding_box, transform_points from facefusion.filesystem import resolve_relative_path from facefusion.thread_helper import thread_semaphore @@ -23,7 +23,7 @@ def create_static_model_set() -> ModelSet: { 'retinaface': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/retinaface_10g.hash', + 'url': resolve_download_url('models-3.0.0', 'retinaface_10g.hash'), 'path': resolve_relative_path('../.assets/models/retinaface_10g.hash') } }, @@ -31,7 +31,7 @@ def create_static_model_set() -> ModelSet: { 'retinaface': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/retinaface_10g.onnx', + 'url': resolve_download_url('models-3.0.0', 'retinaface_10g.onnx'), 'path': resolve_relative_path('../.assets/models/retinaface_10g.onnx') } } @@ -42,7 +42,7 @@ def create_static_model_set() -> ModelSet: { 'scrfd': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/scrfd_2.5g.hash', + 'url': resolve_download_url('models-3.0.0', 'scrfd_2.5g.hash'), 'path': resolve_relative_path('../.assets/models/scrfd_2.5g.hash') } }, @@ -50,7 +50,7 @@ def create_static_model_set() -> ModelSet: { 'scrfd': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/scrfd_2.5g.onnx', + 'url': resolve_download_url('models-3.0.0', 'scrfd_2.5g.onnx'), 'path': resolve_relative_path('../.assets/models/scrfd_2.5g.onnx') } } @@ -61,7 +61,7 @@ def create_static_model_set() -> ModelSet: { 'yoloface': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/yoloface_8n.hash', + 'url': resolve_download_url('models-3.0.0', 'yoloface_8n.hash'), 'path': resolve_relative_path('../.assets/models/yoloface_8n.hash') } }, @@ -69,7 +69,7 @@ def create_static_model_set() -> ModelSet: { 'yoloface': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/yoloface_8n.onnx', + 'url': resolve_download_url('models-3.0.0', 'yoloface_8n.onnx'), 'path': resolve_relative_path('../.assets/models/yoloface_8n.onnx') } } diff --git a/facefusion/face_landmarker.py b/facefusion/face_landmarker.py index 5c69a23a..dd9a8933 100644 --- a/facefusion/face_landmarker.py +++ b/facefusion/face_landmarker.py @@ -5,7 +5,7 @@ import cv2 import numpy from facefusion import inference_manager, state_manager -from facefusion.download import conditional_download_hashes, conditional_download_sources +from facefusion.download import conditional_download_hashes, conditional_download_sources, resolve_download_url from facefusion.face_helper import create_rotated_matrix_and_size, estimate_matrix_by_face_landmark_5, transform_points, warp_face_by_translation from facefusion.filesystem import resolve_relative_path from facefusion.thread_helper import conditional_thread_semaphore @@ -22,7 +22,7 @@ def create_static_model_set() -> ModelSet: { '2dfan4': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/2dfan4.hash', + 'url': resolve_download_url('models-3.0.0', '2dfan4.hash'), 'path': resolve_relative_path('../.assets/models/2dfan4.hash') } }, @@ -30,7 +30,7 @@ def create_static_model_set() -> ModelSet: { '2dfan4': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/2dfan4.onnx', + 'url': resolve_download_url('models-3.0.0', '2dfan4.onnx'), 'path': resolve_relative_path('../.assets/models/2dfan4.onnx') } }, @@ -42,7 +42,7 @@ def create_static_model_set() -> ModelSet: { 'peppa_wutz': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/peppa_wutz.hash', + 'url': resolve_download_url('models-3.0.0', 'peppa_wutz.hash'), 'path': resolve_relative_path('../.assets/models/peppa_wutz.hash') } }, @@ -50,7 +50,7 @@ def create_static_model_set() -> ModelSet: { 'peppa_wutz': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/peppa_wutz.onnx', + 'url': resolve_download_url('models-3.0.0', 'peppa_wutz.onnx'), 'path': resolve_relative_path('../.assets/models/peppa_wutz.onnx') } }, @@ -62,7 +62,7 @@ def create_static_model_set() -> ModelSet: { 'fan_68_5': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/fan_68_5.hash', + 'url': resolve_download_url('models-3.0.0', 'fan_68_5.hash'), 'path': resolve_relative_path('../.assets/models/fan_68_5.hash') } }, @@ -70,7 +70,7 @@ def create_static_model_set() -> ModelSet: { 'fan_68_5': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/fan_68_5.onnx', + 'url': resolve_download_url('models-3.0.0', 'fan_68_5.onnx'), 'path': resolve_relative_path('../.assets/models/fan_68_5.onnx') } } diff --git a/facefusion/face_masker.py b/facefusion/face_masker.py index e7b3214c..b7bb5463 100755 --- a/facefusion/face_masker.py +++ b/facefusion/face_masker.py @@ -6,7 +6,7 @@ import numpy from cv2.typing import Size from facefusion import inference_manager -from facefusion.download import conditional_download_hashes, conditional_download_sources +from facefusion.download import conditional_download_hashes, conditional_download_sources, resolve_download_url from facefusion.filesystem import resolve_relative_path from facefusion.thread_helper import conditional_thread_semaphore from facefusion.typing import DownloadSet, FaceLandmark68, FaceMaskRegion, InferencePool, Mask, ModelSet, Padding, VisionFrame @@ -36,7 +36,7 @@ def create_static_model_set() -> ModelSet: { 'face_occluder': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.1.0/xseg_groggy_5.hash', + 'url': resolve_download_url('models-3.1.0', 'xseg_groggy_5.hash'), 'path': resolve_relative_path('../.assets/models/xseg_groggy_5.hash') } }, @@ -44,7 +44,7 @@ def create_static_model_set() -> ModelSet: { 'face_occluder': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.1.0/xseg_groggy_5.onnx', + 'url': resolve_download_url('models-3.1.0', 'xseg_groggy_5.onnx'), 'path': resolve_relative_path('../.assets/models/xseg_groggy_5.onnx') } }, @@ -56,7 +56,7 @@ def create_static_model_set() -> ModelSet: { 'face_parser': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/bisenet_resnet_34.hash', + 'url': resolve_download_url('models-3.0.0', 'bisenet_resnet_34.hash'), 'path': resolve_relative_path('../.assets/models/bisenet_resnet_34.hash') } }, @@ -64,7 +64,7 @@ def create_static_model_set() -> ModelSet: { 'face_parser': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/bisenet_resnet_34.onnx', + 'url': resolve_download_url('models-3.0.0', 'bisenet_resnet_34'), 'path': resolve_relative_path('../.assets/models/bisenet_resnet_34.onnx') } }, diff --git a/facefusion/face_recognizer.py b/facefusion/face_recognizer.py index d1f094e8..df4f46c5 100644 --- a/facefusion/face_recognizer.py +++ b/facefusion/face_recognizer.py @@ -4,7 +4,7 @@ from typing import Tuple import numpy from facefusion import inference_manager -from facefusion.download import conditional_download_hashes, conditional_download_sources +from facefusion.download import conditional_download_hashes, conditional_download_sources, resolve_download_url from facefusion.face_helper import warp_face_by_face_landmark_5 from facefusion.filesystem import resolve_relative_path from facefusion.thread_helper import conditional_thread_semaphore @@ -21,7 +21,7 @@ def create_static_model_set() -> ModelSet: { 'face_recognizer': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/arcface_w600k_r50.hash', + 'url': resolve_download_url('models-3.0.0', 'arcface_w600k_r50.hash'), 'path': resolve_relative_path('../.assets/models/arcface_w600k_r50.hash') } }, @@ -29,7 +29,7 @@ def create_static_model_set() -> ModelSet: { 'face_recognizer': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/arcface_w600k_r50.onnx', + 'url': resolve_download_url('models-3.0.0', 'arcface_w600k_r50.onnx'), 'path': resolve_relative_path('../.assets/models/arcface_w600k_r50.onnx') } }, diff --git a/facefusion/program.py b/facefusion/program.py index 8fed4d86..0c8bb08d 100755 --- a/facefusion/program.py +++ b/facefusion/program.py @@ -207,14 +207,6 @@ def create_download_providers_program() -> ArgumentParser: return program -def create_skip_download_program() -> ArgumentParser: - program = ArgumentParser(add_help = False) - group_download = program.add_argument_group('download') - group_download.add_argument('--skip-download', help = wording.get('help.skip_download'), action = 'store_true', default = config.get_bool_value('misc.skip_download')) - job_store.register_job_keys([ 'skip_download' ]) - return program - - def create_memory_program() -> ArgumentParser: program = ArgumentParser(add_help = False) group_memory = program.add_argument_group('memory') @@ -256,7 +248,7 @@ def collect_step_program() -> ArgumentParser: def collect_job_program() -> ArgumentParser: - return ArgumentParser(parents= [ create_execution_program(), create_download_providers_program(), create_skip_download_program(), create_memory_program(), create_log_level_program() ], add_help = False) + return ArgumentParser(parents= [ create_execution_program(), create_download_providers_program(), create_memory_program(), create_log_level_program() ], add_help = False) def create_program() -> ArgumentParser: diff --git a/facefusion/typing.py b/facefusion/typing.py index b61d7a5b..20d27c74 100755 --- a/facefusion/typing.py +++ b/facefusion/typing.py @@ -249,7 +249,6 @@ StateKey = Literal\ 'execution_thread_count', 'execution_queue_count', 'download_providers', - 'skip_download', 'video_memory_strategy', 'system_memory_limit', 'log_level', @@ -310,7 +309,6 @@ State = TypedDict('State', 'execution_thread_count' : int, 'execution_queue_count' : int, 'download_providers' : List[DownloadProviderKey], - 'skip_download' : bool, 'video_memory_strategy' : VideoMemoryStrategy, 'system_memory_limit' : int, 'log_level' : LogLevel, diff --git a/facefusion/uis/choices.py b/facefusion/uis/choices.py index 3650365e..da0aa267 100644 --- a/facefusion/uis/choices.py +++ b/facefusion/uis/choices.py @@ -5,7 +5,7 @@ from facefusion.uis.typing import JobManagerAction, JobRunnerAction, WebcamMode job_manager_actions : List[JobManagerAction] = [ 'job-create', 'job-submit', 'job-delete', 'job-add-step', 'job-remix-step', 'job-insert-step', 'job-remove-step' ] job_runner_actions : List[JobRunnerAction] = [ 'job-run', 'job-run-all', 'job-retry', 'job-retry-all' ] -common_options : List[str] = [ 'keep-temp', 'skip-audio', 'skip-download' ] +common_options : List[str] = [ 'keep-temp', 'skip-audio' ] webcam_modes : List[WebcamMode] = [ 'inline', 'udp', 'v4l2' ] webcam_resolutions : List[str] = [ '320x240', '640x480', '800x600', '1024x768', '1280x720', '1280x960', '1920x1080', '2560x1440', '3840x2160' ] diff --git a/facefusion/uis/components/common_options.py b/facefusion/uis/components/common_options.py index 0352ff34..b44b60c3 100644 --- a/facefusion/uis/components/common_options.py +++ b/facefusion/uis/components/common_options.py @@ -13,8 +13,6 @@ def render() -> None: common_options = [] - if state_manager.get_item('skip_download'): - common_options.append('skip-download') if state_manager.get_item('keep_temp'): common_options.append('keep-temp') if state_manager.get_item('skip_audio'): @@ -32,9 +30,7 @@ def listen() -> None: def update(common_options : List[str]) -> None: - skip_temp = 'skip-download' in common_options keep_temp = 'keep-temp' in common_options skip_audio = 'skip-audio' in common_options - state_manager.set_item('skip_download', skip_temp) state_manager.set_item('keep_temp', keep_temp) state_manager.set_item('skip_audio', skip_audio) diff --git a/facefusion/uis/layouts/benchmark.py b/facefusion/uis/layouts/benchmark.py index 76485904..65266ec0 100644 --- a/facefusion/uis/layouts/benchmark.py +++ b/facefusion/uis/layouts/benchmark.py @@ -6,21 +6,19 @@ from facefusion.uis.components import about, age_modifier_options, benchmark, be def pre_check() -> bool: - if not state_manager.get_item('skip_download'): - conditional_download('.assets/examples', - [ - resolve_download_url('examples-3.0.0', 'source.jpg'), - resolve_download_url('examples-3.0.0', 'source.mp3'), - resolve_download_url('examples-3.0.0', 'target-240p.mp4'), - resolve_download_url('examples-3.0.0', 'target-360p.mp4'), - resolve_download_url('examples-3.0.0', 'target-540p.mp4'), - resolve_download_url('examples-3.0.0', 'target-720p.mp4'), - resolve_download_url('examples-3.0.0', 'target-1080p.mp4'), - resolve_download_url('examples-3.0.0', 'target-1440p.mp4'), - resolve_download_url('examples-3.0.0', 'target-2160p.mp4') - ]) - return True - return False + conditional_download('.assets/examples', + [ + resolve_download_url('examples-3.0.0', 'source.jpg'), + resolve_download_url('examples-3.0.0', 'source.mp3'), + resolve_download_url('examples-3.0.0', 'target-240p.mp4'), + resolve_download_url('examples-3.0.0', 'target-360p.mp4'), + resolve_download_url('examples-3.0.0', 'target-540p.mp4'), + resolve_download_url('examples-3.0.0', 'target-720p.mp4'), + resolve_download_url('examples-3.0.0', 'target-1080p.mp4'), + resolve_download_url('examples-3.0.0', 'target-1440p.mp4'), + resolve_download_url('examples-3.0.0', 'target-2160p.mp4') + ]) + return True def render() -> gradio.Blocks: diff --git a/facefusion/voice_extractor.py b/facefusion/voice_extractor.py index a66114ee..bd208097 100644 --- a/facefusion/voice_extractor.py +++ b/facefusion/voice_extractor.py @@ -5,7 +5,7 @@ import numpy import scipy from facefusion import inference_manager -from facefusion.download import conditional_download_hashes, conditional_download_sources +from facefusion.download import conditional_download_hashes, conditional_download_sources, resolve_download_url from facefusion.filesystem import resolve_relative_path from facefusion.thread_helper import thread_semaphore from facefusion.typing import Audio, AudioChunk, InferencePool, ModelOptions, ModelSet @@ -21,7 +21,7 @@ def create_static_model_set() -> ModelSet: { 'voice_extractor': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/kim_vocal_2.hash', + 'url': resolve_download_url('models-3.0.0', 'kim_vocal_2.hash'), 'path': resolve_relative_path('../.assets/models/kim_vocal_2.hash') } }, @@ -29,7 +29,7 @@ def create_static_model_set() -> ModelSet: { 'voice_extractor': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/kim_vocal_2.onnx', + 'url': resolve_download_url('models-3.0.0', 'kim_vocal_2.onnx'), 'path': resolve_relative_path('../.assets/models/kim_vocal_2.onnx') } } diff --git a/facefusion/wording.py b/facefusion/wording.py index 8092d862..ebae1a05 100755 --- a/facefusion/wording.py +++ b/facefusion/wording.py @@ -185,7 +185,6 @@ WORDING : Dict[str, Any] =\ 'execution_queue_count': 'specify the amount of frames each thread is processing', # download 'download_providers': 'download using different providers (choices: {choices}, ...)', - 'skip_download': 'omit downloads and remote lookups', # memory 'video_memory_strategy': 'balance fast processing and low VRAM usage', 'system_memory_limit': 'limit the available RAM that can be used while processing', diff --git a/tests/test_face_analyser.py b/tests/test_face_analyser.py index 7c351861..81b479eb 100644 --- a/tests/test_face_analyser.py +++ b/tests/test_face_analyser.py @@ -21,6 +21,7 @@ def before_all() -> None: subprocess.run([ 'ffmpeg', '-i', get_test_example_file('source.jpg'), '-vf', 'crop=iw*0.6:ih*0.6', get_test_example_file('source-60crop.jpg') ]) state_manager.init_item('execution_device_id', 0) state_manager.init_item('execution_providers', [ 'cpu' ]) + state_manager.init_item('download_providers', [ 'github' ]) state_manager.init_item('face_detector_angles', [ 0 ]) state_manager.init_item('face_detector_model', 'many') state_manager.init_item('face_detector_score', 0.5) diff --git a/tests/test_inference_pool.py b/tests/test_inference_pool.py index 563f1df0..17492267 100644 --- a/tests/test_inference_pool.py +++ b/tests/test_inference_pool.py @@ -9,9 +9,10 @@ from facefusion.inference_manager import INFERENCE_POOLS, get_inference_pool @pytest.fixture(scope = 'module', autouse = True) def before_all() -> None: - content_analyser.pre_check() state_manager.init_item('execution_device_id', 0) state_manager.init_item('execution_providers', [ 'cpu' ]) + state_manager.init_item('download_providers', [ 'github' ]) + content_analyser.pre_check() def test_get_inference_pool() -> None: