fixed qwen2 audio issues, works fine now (+3 squashed commit)

Squashed commit:

[b3053a1ba] updated lite

[5071630d6] fixed mtmd issues, audio works

[06efa5af4] fix mtmd compile
This commit is contained in:
Concedo
2025-07-12 12:46:58 +08:00
parent 5a3b2e3921
commit dca49de059
6 changed files with 218 additions and 90 deletions
+2 -2
View File
@@ -454,7 +454,7 @@ bool audio_embd_make_with_clip_img(clip_ctx * ctx_clip, int n_threads, const whi
batch_f32.entries.push_back(std::move(mel_f32));
int n_mmproj_embd = clip_n_mmproj_embd(ctx_clip);
float * audio_embd = (float *)malloc(n_tokens * n_mmproj_embd);
float * audio_embd = (float *)malloc(n_tokens * n_mmproj_embd * sizeof(float));
bool ok = clip_image_batch_encode(
ctx_clip,
n_threads,
@@ -462,5 +462,5 @@ bool audio_embd_make_with_clip_img(clip_ctx * ctx_clip, int n_threads, const whi
audio_embd);
*image_embd_out = audio_embd;
*n_img_pos_out = n_tokens;
return ok ? 0 : 1;
return ok;
}
+1 -1
View File
@@ -29,7 +29,7 @@
#define MA_API static
#include "miniaudio/miniaudio.h"
#define STB_IMAGE_IMPLEMENTATION
// #define STB_IMAGE_IMPLEMENTATION
#include "stb/stb_image.h"
#define LOG_INF(...) fprintf(stdout, __VA_ARGS__)