From 7ae885c1efd29b9857cb9aead5561e572c2424b3 Mon Sep 17 00:00:00 2001 From: arizhih <40765267+arizhih@users.noreply.github.com> Date: Mon, 15 Jul 2024 14:50:36 +0200 Subject: [PATCH] whisper : fix DTW assert (#2299) --- src/whisper.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/whisper.cpp b/src/whisper.cpp index 36370604..47c58cfb 100644 --- a/src/whisper.cpp +++ b/src/whisper.cpp @@ -7220,9 +7220,10 @@ struct median_filter_user_data { }; static void median_filter(struct ggml_tensor * dst , const struct ggml_tensor * a, int ith, int nth, void * userdata) { + if (ith != 0) { + return; + } int filter_width = ((median_filter_user_data *) userdata)->filter_width; - WHISPER_ASSERT(nth == 1); - WHISPER_ASSERT(ith == 0); WHISPER_ASSERT(filter_width < a->ne[2]); WHISPER_ASSERT(filter_width % 2); WHISPER_ASSERT(ggml_n_dims(a) == 3);