mirror of
https://github.com/facefusion/facefusion.git
synced 2026-09-20 22:40:42 +02:00
Qa/follow set naming (#867)
* Follow set naming * Follow set naming * Disable type hints * Uniform order
This commit is contained in:
@@ -79,8 +79,9 @@ def create_static_model_set(download_scope : DownloadScope) -> ModelSet:
|
||||
|
||||
def get_inference_pool() -> InferencePool:
|
||||
model_names = [ state_manager.get_item('face_detector_model') ]
|
||||
_, model_sources = collect_model_downloads()
|
||||
return inference_manager.get_inference_pool(__name__, model_names, model_sources)
|
||||
_, model_source_set = collect_model_downloads()
|
||||
|
||||
return inference_manager.get_inference_pool(__name__, model_names, model_source_set)
|
||||
|
||||
|
||||
def clear_inference_pool() -> None:
|
||||
@@ -89,22 +90,22 @@ def clear_inference_pool() -> None:
|
||||
|
||||
|
||||
def collect_model_downloads() -> Tuple[DownloadSet, DownloadSet]:
|
||||
model_hashes = {}
|
||||
model_sources = {}
|
||||
model_set = create_static_model_set('full')
|
||||
model_hash_set = {}
|
||||
model_source_set = {}
|
||||
|
||||
for face_detector_model in [ 'retinaface', 'scrfd', 'yolo_face' ]:
|
||||
if state_manager.get_item('face_detector_model') in [ 'many', face_detector_model ]:
|
||||
model_hashes[face_detector_model] = model_set.get(face_detector_model).get('hashes').get(face_detector_model)
|
||||
model_sources[face_detector_model] = model_set.get(face_detector_model).get('sources').get(face_detector_model)
|
||||
model_hash_set[face_detector_model] = model_set.get(face_detector_model).get('hashes').get(face_detector_model)
|
||||
model_source_set[face_detector_model] = model_set.get(face_detector_model).get('sources').get(face_detector_model)
|
||||
|
||||
return model_hashes, model_sources
|
||||
return model_hash_set, model_source_set
|
||||
|
||||
|
||||
def pre_check() -> bool:
|
||||
model_hashes, model_sources = collect_model_downloads()
|
||||
model_hash_set, model_source_set = collect_model_downloads()
|
||||
|
||||
return conditional_download_hashes(model_hashes) and conditional_download_sources(model_sources)
|
||||
return conditional_download_hashes(model_hash_set) and conditional_download_sources(model_source_set)
|
||||
|
||||
|
||||
def detect_faces(vision_frame : VisionFrame) -> Tuple[List[BoundingBox], List[Score], List[FaceLandmark5]]:
|
||||
|
||||
Reference in New Issue
Block a user