Skip to content

ANE prediction failed: MultiArray shape (324 x 768) does not match the shape (256 x 768) specified in the model description #570

@yujonglee

Description

@yujonglee

Reproduce

images.zip

APPLE_MODEL: lfm2-vl-450m-int8-apple.zip

CPU_MODEL: lfm2-vl-450m-int8.zip


export \
  APPLE_MODEL=/tmp/char-vlm-test/apple \
  CPU_MODEL=/tmp/char-vlm-test/non_ane \
  IMG_PASS=~/Downloads/black-264.png \
  IMG_FAIL=~/Downloads/black-272.png \
  VLM_PROMPT="Describe this image."
run_case(){ name=$1 model=$2 image=$3; printf '== %s ==\nmodel=%s\nimage=%s\n' "$name" "$model" "$image"; cargo run -q -p llm-cactus --example complete -- --model "$model" --prompt "$VLM_PROMPT" --image "$image" >"/tmp/${name}.out" 2>"/tmp/${name}.err"; rc=$?; printf 'exit=%s\n' "$rc"; tail -n 4 "/tmp/${name}.err"; echo; }; run_case apple_pass "$APPLE_MODEL" "$IMG_PASS"; run_case apple_fail "$APPLE_MODEL" "$IMG_FAIL"; run_case cpu_pass_small "$CPU_MODEL" "$IMG_PASS"; run_case cpu_pass_large "$CPU_MODEL" "$IMG_FAIL"

Result

== apple_pass ==
model=/tmp/char-vlm-test/apple
image=/Users/yujonglee/Downloads/black-264.png
exit=0

== apple_fail ==
model=/tmp/char-vlm-test/apple
image=/Users/yujonglee/Downloads/black-272.png
exit=1
[ERROR] [npu] ANE prediction failed: MultiArray shape (324 x 768) does not match the shape (256 x 768) specified in the model description
[ERROR] [complete] Exception: NPU encoder failed
error: request failed: HTTP 500 Internal Server Error
inference failed: cactus_complete failed (-1)

== cpu_pass_small ==
model=/tmp/char-vlm-test/non_ane
image=/Users/yujonglee/Downloads/black-264.png
exit=0
[WARN] [npu] not using NPU

== cpu_pass_large ==
model=/tmp/char-vlm-test/non_ane
image=/Users/yujonglee/Downloads/black-272.png
exit=0
[WARN] [npu] not using NPU

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions