From f94c72ad617ba02b3091bcb7f118f73d0bf271c7 Mon Sep 17 00:00:00 2001 From: LSXPrime Date: Thu, 7 Nov 2024 04:13:58 +0200 Subject: [PATCH] fix: call ggml_time_init() to avoid DivideByZeroException. calling `ggml_time_init()` before the `int64_t t_load_start_us = ggml_time_us();` in `bark_load_model` function to avoid dividing on uninitialized `timer_freq`. --- bark.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/bark.cpp b/bark.cpp index bc589e2..4dadda3 100644 --- a/bark.cpp +++ b/bark.cpp @@ -1175,6 +1175,7 @@ static bool bark_load_model_from_file( } struct bark_context* bark_load_model(const char* model_path, struct bark_context_params params, uint32_t seed) { + ggml_time_init(); int64_t t_load_start_us = ggml_time_us(); struct bark_context* bctx = new bark_context();