Skip to content

Commit 73b81db

Browse files
ggerganovolexiyb
authored andcommitted
server : do not release slot on image input (ggml-org#3798)
1 parent 3e1a7e7 commit 73b81db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/server/server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1502,7 +1502,7 @@ struct llama_server_context
15021502
{
15031503
for (auto & slot : slots)
15041504
{
1505-
const bool has_prompt = slot.prompt.is_array() || (slot.prompt.is_string() && !slot.prompt.get<std::string>().empty());
1505+
const bool has_prompt = slot.prompt.is_array() || (slot.prompt.is_string() && !slot.prompt.get<std::string>().empty()) || !slot.images.empty();
15061506

15071507
// empty prompt passed -> release the slot and send empty response
15081508
if (slot.state == IDLE && slot.command == LOAD_PROMPT && !has_prompt)

0 commit comments

Comments
 (0)