]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
whisper : fix bug from previous commit
authorGeorgi Gerganov <redacted>
Sat, 29 Apr 2023 07:42:14 +0000 (10:42 +0300)
committerGeorgi Gerganov <redacted>
Sat, 29 Apr 2023 07:42:14 +0000 (10:42 +0300)
whisper.cpp

index 820c48becd82ff258c9f6e6cb8e169600c255e1d..583f2d8e32085a7ef2f82784acebfcca51791ed7 100644 (file)
@@ -2609,6 +2609,8 @@ struct whisper_context * whisper_init_from_file_no_state(const char * path_model
 
     whisper_model_loader loader = {};
 
+    loader.context = &fin;
+
     loader.read = [](void * ctx, void * output, size_t read_size) {
         std::ifstream * fin = (std::ifstream*)ctx;
         fin->read((char *)output, read_size);
@@ -2647,8 +2649,6 @@ struct whisper_context * whisper_init_from_buffer_no_state(void * buffer, size_t
 
     whisper_model_loader loader = {};
 
-    fprintf(stderr, "%s: loading model from buffer\n", __func__);
-
     loader.context = &ctx;
 
     loader.read = [](void * ctx, void * output, size_t read_size) {