mirror of
https://github.com/facefusion/facefusion.git
synced 2026-07-28 12:59:03 +02:00
* remove todo * sort out workflow, to match upcoming v4 * remove look ahead * remove core namespace again
31 lines
635 B
Python
31 lines
635 B
Python
from functools import partial
|
|
|
|
from facefusion import process_manager
|
|
from facefusion.types import ErrorCode
|
|
from facefusion.workflows.core import clear, setup
|
|
from facefusion.workflows.to_image import analyse_image, finalize_image, prepare_image, process_image
|
|
|
|
|
|
def process(start_time : float) -> ErrorCode:
|
|
tasks =\
|
|
[
|
|
analyse_image,
|
|
clear,
|
|
setup,
|
|
prepare_image,
|
|
process_image,
|
|
partial(finalize_image, start_time),
|
|
clear
|
|
]
|
|
process_manager.start()
|
|
|
|
for task in tasks:
|
|
error_code = task() #type:ignore[operator]
|
|
|
|
if error_code > 0:
|
|
process_manager.end()
|
|
return error_code
|
|
|
|
process_manager.end()
|
|
return 0
|