Skip to content

Commit bfa118e

Browse files
committed
fix llava segfault
1 parent 4b96c3b commit bfa118e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

gpttype_adapter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3547,8 +3547,7 @@ generation_outputs gpttype_generate(const generation_inputs inputs)
35473547
if(i>0 && sepsize>0)
35483548
{
35493549
//add a separator between each image
3550-
kcpp_embd_batch batch = kcpp_embd_batch(embd, n_past);
3551-
auto evr = llama_decode(llama_ctx_v4, batch.batch);
3550+
auto evr = llama_decode(llama_ctx_v4, llama_batch_get_one(llava_sep.data(), sepsize));
35523551
if(evr!=0)
35533552
{
35543553
printf("\nError when appending llava separator: %d\n",evr);

0 commit comments

Comments
 (0)