HEF magic does not match

If you get HEF magic does not match error running a model with hailortcli run < HEF-PATH >, it may indicate one of the following situations:

  • The HEF file got corrupted: please try to regenerate the file

  • You are trying to run a HAR file. Please make sure that you did not copy the HAR file to the HEF file location. hailortcli cannot run HAR files

hailortcli run model.her
Running streaming inference (model.her):
Transform data: true
Type:      auto
Quantized: true
[HailoRT] [error] CHECK failed - HEF magic does not match. detected magic - 2f2e2f2e
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INVALID_HEF(26)
[HailoRT] [error] Failed parsing HEF file
[HailoRT] [error] Failed creating HEF
[HailoRT] [error] CHECK_EXPECTED failed with status=HAILO_INVALID_HEF(26)
[HailoRT CLI] [error] CHECK_EXPECTED failed with status=HAILO_INVALID_HEF(26) - Failed reading hef file model.hef
[HailoRT] [error] CHECK failed - HEF magic does not match. detected magic - 2f2e2f2e
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INVALID_HEF(26)
[HailoRT] [error] Failed parsing HEF file
[HailoRT] [error] Failed creating HEF
[HailoRT] [error] CHECK_EXPECTED failed with status=HAILO_INVALID_HEF(26)
[HailoRT CLI] [error] CHECK_EXPECTED_AS_STATUS failed with status=HAILO_INVALID_HEF(26)
2 Likes