]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
whisper : fix DTW assert (#2299)
authorarizhih <redacted>
Mon, 15 Jul 2024 12:50:36 +0000 (14:50 +0200)
committerGitHub <redacted>
Mon, 15 Jul 2024 12:50:36 +0000 (15:50 +0300)
src/whisper.cpp

index 3637060417b0fb517a45b28bcb086398932b5ed6..47c58cfb76a0f0f3611dd8f8a0838eaab37f27d8 100644 (file)
@@ -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);