mirror of
https://github.com/facefusion/facefusion.git
synced 2026-09-20 22:40:42 +02:00
Add another xseg model, Simplify download mapping (#851)
This commit is contained in:
@@ -91,17 +91,10 @@ def collect_model_downloads() -> Tuple[DownloadSet, DownloadSet]:
|
||||
model_sources = {}
|
||||
model_set = create_static_model_set('full')
|
||||
|
||||
if state_manager.get_item('face_detector_model') in [ 'many', 'retinaface' ]:
|
||||
model_hashes['retinaface'] = model_set.get('retinaface').get('hashes').get('retinaface')
|
||||
model_sources['retinaface'] = model_set.get('retinaface').get('sources').get('retinaface')
|
||||
|
||||
if state_manager.get_item('face_detector_model') in [ 'many', 'scrfd' ]:
|
||||
model_hashes['scrfd'] = model_set.get('scrfd').get('hashes').get('scrfd')
|
||||
model_sources['scrfd'] = model_set.get('scrfd').get('sources').get('scrfd')
|
||||
|
||||
if state_manager.get_item('face_detector_model') in [ 'many', 'yoloface' ]:
|
||||
model_hashes['yoloface'] = model_set.get('yoloface').get('hashes').get('yoloface')
|
||||
model_sources['yoloface'] = model_set.get('yoloface').get('sources').get('yoloface')
|
||||
for face_detector_model in [ 'retinaface', 'scrfd', 'yoloface' ]:
|
||||
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)
|
||||
|
||||
return model_hashes, model_sources
|
||||
|
||||
|
||||
Reference in New Issue
Block a user