FL33TW00D / whisper-turbo

Cross-Platform, GPU Accelerated Whisper 🏎️
https://whisper-turbo.com
Apache License 2.0
1.72k stars 75 forks source link

Memory issues #38

Closed DavidGOrtega closed 1 year ago

DavidGOrtega commented 1 year ago

Experimenting with the project I found two issues:

  1. GPU memory is not released after the infer.
  2. The bigger the audio file the bigger the memory consumed. For a 4min file it drains on my computer 4,48GB. Bigger files has frozen my computer draining up to 20GB.

Macos M1 16GB Ventura 13.1 Chromium 118.0.5993.32

FL33TW00D commented 1 year ago

I’m aware of the leak! Fix coming during the next big release.

I’m on vacation at the moment, fix coming in November

DavidGOrtega commented 1 year ago

I have tried to free the session after the stream or run

const result = Result.ok(await this.whisperSession.stream(audio, callback)) as Result<void, Error>;
this.whisperSession.free();
return result;

but did not work, maye be it has to be done at a segment level?

However despite that Segment is meant to be

export class Segment {
  free(): void;
}

It returns another kind of object.

Are you using laserbreak in whisper-gpu?

DavidGOrtega commented 1 year ago

I’m on vacation at the moment, fix coming in November

Happy holidays! 🌴

FL33TW00D commented 1 year ago

I have tried to free the session after the stream or run

const result = Result.ok(await this.whisperSession.stream(audio, callback)) as Result<void, Error>;
this.whisperSession.free();
return result;

but did not work, maye be it has to be done at a segment level?

However despite that Segment is meant to be

export class Segment {
  free(): void;
}

It returns another kind of object.

Are you using laserbreak in whisper-gpu?

This won’t work unfortunately- the problem is deeper.

Laserbeak isnt being used in this project.

FL33TW00D commented 1 year ago

I’m on vacation at the moment, fix coming in November

Happy holidays! 🌴

@DavidGOrtega Leak is fixed, will be released in 0.8.0! Thanks for letting me know and testing it out!