Limit enhancer to 1 thread but restore afterwards

This commit is contained in:
henryruhs 2023-06-13 19:22:42 +02:00
parent a9f723e7d9
commit ff2c216dee
2 changed files with 4 additions and 3 deletions

View File

@ -139,4 +139,8 @@ def process_image(source_path: str, image_path: str, output_file: str) -> None:
def process_video(source_path: str, temp_frame_paths: List[str]) -> None:
# todo: remove threads limitation again
execution_threads = roop.globals.execution_threads
roop.globals.execution_threads = 1
roop.processors.frame.core.process_video(source_path, temp_frame_paths, process_frames)
roop.globals.execution_threads = execution_threads

View File

@ -69,7 +69,4 @@ def process_image(source_path: str, target_path: str, output_path: str) -> None:
def process_video(source_path: str, temp_frame_paths: List[str]) -> None:
execution_threads = roop.globals.execution_threads
roop.globals.execution_threads = 1
roop.processors.frame.core.process_video(source_path, temp_frame_paths, process_frames)
roop.globals.execution_threads = execution_threads