diff --git a/scripts/serve-frank-medium.sh b/scripts/serve-frank-medium.sh index 0b1dbe3..339f600 100755 --- a/scripts/serve-frank-medium.sh +++ b/scripts/serve-frank-medium.sh @@ -161,8 +161,13 @@ TEMPLATE_ARGS+=(--chat-template-kwargs "$CHAT_TEMPLATE_KWARGS") PLACEMENT_ARGS=(--device "$DEVICES" --split-mode "$SPLIT_MODE" --tensor-split "$TENSOR_SPLIT") MMPROJ_ARGS=() -[[ "$NO_MMPROJ" == "1" ]] && MMPROJ_ARGS=(--no-mmproj) - +if [[ "$NO_MMPROJ" == "1" ]]; then + MMPROJ_ARGS=(--no-mmproj) +else + # No autoload in this build: a server without the flag starts text-only + # and answers image requests with a 500, so name the projector. + MMPROJ_ARGS=(--mmproj "$MM_PROJ") +fi exec "$LLAMA_BIN" \ --model "$MODEL" \ --alias "$ALIAS" \ diff --git a/tests/frank_medium_unit.bats b/tests/frank_medium_unit.bats index a9e042a..3dd02e7 100755 --- a/tests/frank_medium_unit.bats +++ b/tests/frank_medium_unit.bats @@ -230,7 +230,8 @@ print('draft-model wiring ok') grep -q '^NO_MMPROJ=0$' "$ENV_FILE" grep -q '^MM_PROJ_FILE=mmproj-BF16.gguf$' "$ENV_FILE" # The serve script refuses to start without the projector when vision is - # on, so a missing file is a deploy error, not a silent text-only server. + # Explicit flag, not autoload: this build starts text-only without it. + grep -q -- '--mmproj "$MM_PROJ"' "$SERVE" grep -q 'vision is enabled but the projector is missing' "$SERVE" # And the download script fetches and byte-verifies it. grep -q '^MM_PROJ_SIZE=931145888$' "$FETCH"