[Python] Inference time delay occured

Discussão em 'Python' iniciado por Stack, Novembro 29, 2024.

  1. Stack

    Stack Membro Participativo

    I am currently working on the GFPGAN model. I want to implement multi-frame processing features simultaneously using Python's multiprocessing.

    When I run one process, I experience a delay of around 0.25 seconds. When I run two processes at once, the delay increases to approximately 0.45 seconds. With three processes running simultaneously, the delay rises to about 0.65 seconds.

    I am certain that parallel processing is functioning, but I am encountering additional delays when running multiple processes concurrently.

    Could you please let me know the reason for this and how I can reduce the additional delays when using multiple processes?

    Thank you!

    I implemented loading model files (*.pth) and the inference function for each process, and I call the processes simultaneously. I created timestamps for each process; as a result, the start time of the inference function was the same, but the end times were slightly different.

    Continue reading...

Compartilhe esta Página