-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multithreading processing chain #66
Comments
Intermediate tests on 497 frames 1920x1080 video with the same processing chain (in-memory extracting -> FaceSwapper->FaceEnhancer): Current master (cpu+cuda execution providers): ~580s (18% faster of best parallel result). It is worth to try to play some thread-control logic. it seems, that in some cases parallel execution can speed up the whole processing, and slow it down in other. |
Due to unsatisfactory experiments result and changes in the common processing logic the task is closed. |
In the current processing logic all frame processors runs in turns, one after one. The advantages of this logic are obvious: it is simple, there is a possibility to stop and resume processing at any time, e.t.c.
But there are disadvantages too, and they seems to be critical at this moment. There is no possibility to implement any realtime preview with this logic, and there is no place for speed enhancements, because we can't parallelize processing task.
So, there is a big (really big) task to implement multithreading there.
There will be named buffers, each buffer named to a linked processor. Each processor processing will start in the separate thread, it will read a frame from the input buffer, process it, and write to the output buffer (which is input buffer for the next processor).
There are subtasks for this task:
ThreadPoolExecutor
workers). #70The text was updated successfully, but these errors were encountered: