Peter-obi / Video_summarization_mlx

Transcribe and summarize videos using whisper and llms on apple mlx framework
MIT License
71 stars 6 forks source link

libc++abi: terminating due to uncaught exception of type std::runtime_error: Attempting to allocate 35545823296 bytes which is greater than the maximum allowed buffer size of 8589934592 bytes. #2

Open joshuachen3333 opened 2 months ago

joshuachen3333 commented 2 months ago

I borrowed a M2 macbook air machine and tried the video summarize code, but I encountered the following error and stopped at :

Transcribing files/audio/heb005_360.wav (this may take a while)... Audio has been transcribed in 152 seconds Found 2 chunks. Summarizing using MLX model... Generating summary with MLX model... Generating summary with MLX model... libc++abi: terminating due to uncaught exception of type std::runtime_error: Attempting to allocate 35545823296 bytes which is greater than the maximum allowed buffer size of 8589934592 bytes. zsh: abort python main.py --input_path --title "heb005"

it seemed some amount of memory exceeds the default buffer size. Wonder anyone knows what I need to increase? and how can I do that?

here is my environment ProductName: macOS ProductVersion: 14.5 BuildVersion: 23F79 Xcode 15.4 Apple clang version 15.0.0 (clang-1500.3.9.4) Target: arm64-apple-darwin23.5.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin Python 3.11.9