Skip to content
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

memory optimizations for pyannote.audio.core.inference.Inference.aggregate() #1713

Merged
merged 4 commits into from
May 28, 2024

Commits on May 23, 2024

  1. do not copy array

    since we are overwriting scores.data with an augmented scores.data, just operate on the array in place.
    
    * this results in ~8GB of memory savings on a 9 hour recording
    benniekiss committed May 23, 2024
    Configuration menu
    Copy the full SHA
    18fc446 View commit details
    Browse the repository at this point in the history
  2. calculate 'mask' and sanitize 'score' within loop

    storing ALL calculated masks in a tensor can consume a lot of RAM,
    about 4GB for ~9hr audio.
    so we save calculating the mask until the loop.
    because the mask is now calculated in the loop, we have to wait until after
    calculating the mask in order to np.nan_to_num(score)
    benniekiss committed May 23, 2024
    Configuration menu
    Copy the full SHA
    0b4dbd3 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2024

  1. Configuration menu
    Copy the full SHA
    624f936 View commit details
    Browse the repository at this point in the history

Commits on May 28, 2024

  1. doc: update changelog

    hbredin committed May 28, 2024
    Configuration menu
    Copy the full SHA
    4906ab8 View commit details
    Browse the repository at this point in the history