mirror of
https://github.com/facefusion/facefusion.git
synced 2026-07-27 12:30:55 +02:00
match upcoming code more
This commit is contained in:
@@ -23,6 +23,7 @@ def process(start_time : float) -> ErrorCode:
|
||||
tasks =\
|
||||
[
|
||||
analyse_video,
|
||||
clear,
|
||||
setup
|
||||
]
|
||||
|
||||
@@ -40,7 +41,8 @@ def process(start_time : float) -> ErrorCode:
|
||||
tasks.extend(
|
||||
[
|
||||
restore_audio,
|
||||
partial(finalize_video,start_time)
|
||||
partial(finalize_video, start_time),
|
||||
clear
|
||||
])
|
||||
|
||||
process_manager.start()
|
||||
@@ -65,11 +67,16 @@ def analyse_video() -> ErrorCode:
|
||||
return 0
|
||||
|
||||
|
||||
#todo: needs review - [workflow] [critical: low] analysis moved out of setup into the analyse_video task
|
||||
def setup() -> ErrorCode:
|
||||
#todo: no review needed - [workflow] copy of v4 clear task, clears temp ahead of setup and again after finalize_video
|
||||
def clear() -> ErrorCode:
|
||||
if clear_temp_directory(state_manager.get_item('target_path')):
|
||||
logger.debug(translator.get('clearing_temp'), __name__)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
#todo: no review needed - [workflow] copy of v4 setup task, analysis and clearing moved out into the analyse_video and clear tasks
|
||||
def setup() -> ErrorCode:
|
||||
if create_temp_directory(state_manager.get_item('target_path')):
|
||||
logger.debug(translator.get('creating_temp'), __name__)
|
||||
|
||||
@@ -297,10 +304,8 @@ def process_stream_frame(frame_number : int, temp_video_resolution : Resolution)
|
||||
return frame_number, numpy.ascontiguousarray(temp_vision_frame)
|
||||
|
||||
|
||||
#todo: no review needed - [workflow] copy of v4 finalize_video task, temp clearing moved out into the clear task
|
||||
def finalize_video(start_time : float) -> ErrorCode:
|
||||
logger.debug(translator.get('clearing_temp'), __name__)
|
||||
clear_temp_directory(state_manager.get_item('target_path'))
|
||||
|
||||
if is_video(state_manager.get_item('output_path')):
|
||||
logger.info(translator.get('processing_video_succeeded').format(seconds = calculate_end_time(start_time)), __name__)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user