How to append new model_name?

Hi,

I use hailomz compile version 3.28 and hailo model zoo

In hailo_compile/hailo_model_zoo/training/vit/README.rst, there are many good performance models

But, How to use?

when i choose eva02_large_patch14_448.mim_m38m_ft_in1kmodel, no name in model_list

hailomz compile: error: argument model_name: invalid choice: 'eva02_large_patch14_448' (choose from 'arcface_mobilefacenet', 'arcface_mobilefacenet_nv12', 'arcface_mobilefacenet_rgbx', 'arcface_r50', 'centernet_resnet_v1_18_postprocess', 'centernet_resnet_v1_50_postprocess', 'centerpose_regnetx_1.6gf_fpn', 'centerpose_regnetx_800mf', 'centerpose_repvgg_a0', 'clip_resnet_50', 'damoyolo_tinynasL20_T', 'damoyolo_tinynasL25_S', 'damoyolo_tinynasL35_M', 'deeplab_v3_mobilenet_v2', 'deeplab_v3_mobilenet_v2_wo_dilation', 'detr_resnet_v1_18_bn', 'dncnn3', 'dncnn_color_blind', 'efficientdet_lite0', 'efficientdet_lite1', 'efficientdet_lite2', 'efficientnet_l', 'efficientnet_lite0', 'efficientnet_lite1', 'efficientnet_lite2', 'efficientnet_lite3', 'efficientnet_lite4', 'efficientnet_m', 'efficientnet_s', 'espcn_x2', 'espcn_x3', 'espcn_x4', 'face_attr_resnet_v1_18', 'face_attr_resnet_v1_18_nv12', 'face_attr_resnet_v1_18_rgbx', 'fast_depth', 'fast_depth_nv12_fhd', 'fast_sam_s', 'fcn8_resnet_v1_18', 'hand_landmark_lite', 'hardnet39ds', 'hardnet68', 'inception_v1', 'lightface_slim', 'lightface_slim_nv12', 'lightface_slim_nv12_fhd', 'lprnet', 'lprnet_yuy2', 'mobilenet_v1', 'mobilenet_v2_1.0', 'mobilenet_v2_1.4', 'mobilenet_v3', 'mobilenet_v3_large_minimalistic', 'mspn_regnetx_800mf', 'mspn_regnetx_800mf_nv12', 'nanodet_repvgg', 'nanodet_repvgg_a12', 'nanodet_repvgg_a1_640', 'osnet_x1_0', 'person_attr_resnet_v1_18', 'person_attr_resnet_v1_18_nv12', 'person_attr_resnet_v1_18_rgbx', 'regnetx_1.6gf', 'regnetx_800mf', 'repvgg_a0_person_reid_512', 'repvgg_a1', 'repvgg_a2', 'resmlp12_relu', 'resnet_v1_18', 'resnet_v1_34', 'resnet_v1_50', 'resnext26_32x4d', 'resnext50_32x4d', 'retinaface_mobilenet_v1', 'retinaface_mobilenet_v1_rgbx', 'scdepthv3', 'scrfd_10g', 'scrfd_10g_nv12_fhd', 'scrfd_2.5g', 'scrfd_500m', 'segformer_b0_bn', 'squeezenet_v1.1', 'ssd_mobilenet_v1', 'ssd_mobilenet_v1_no_alls', 'ssd_mobilenet_v1_visdrone', 'ssd_mobilenet_v2', 'stdc1', 'stereonet', 'tddfa_mobilenet_v1', 'tddfa_mobilenet_v1_nv12', 'tiny_yolov3', 'tiny_yolov4', 'tiny_yolov4_license_plates', 'tiny_yolov4_license_plates_yuy2', 'unet_mobilenet_v2', 'vit_base_bn', 'vit_pose_small', 'vit_pose_small_bn', 'vit_small_bn', 'vit_tiny_bn', 'yolact_regnetx_1.6gf', 'yolact_regnetx_800mf', 'yolov3', 'yolov3_416', 'yolov3_gluon', 'yolov3_gluon_416', 'yolov4_leaky', 'yolov5l_seg', 'yolov5m', 'yolov5m6_6.1', 'yolov5m_6.1', 'yolov5m_seg', 'yolov5m_vehicles', 'yolov5m_vehicles_nv12', 'yolov5m_vehicles_yuy2', 'yolov5m_wo_spp', 'yolov5m_wo_spp_60p', 'yolov5m_wo_spp_60p_nv12_fhd', 'yolov5m_wo_spp_yuy2', 'yolov5n_seg', 'yolov5n_seg_nv12_fhd', 'yolov5s', 'yolov5s_c3tr', 'yolov5s_personface', 'yolov5s_personface_nv12', 'yolov5s_personface_nv12_fhd', 'yolov5s_personface_rgbx', 'yolov5s_seg', 'yolov5xs_wo_spp', 'yolov5xs_wo_spp_nms_core', 'yolov6n', 'yolov6n_0.2.1', 'yolov7', 'yolov7_tiny', 'yolov7e6', 'yolov8l', 'yolov8m', 'yolov8m_pose', 'yolov8m_seg', 'yolov8n', 'yolov8n_seg', 'yolov8s', 'yolov8s_pose', 'yolov8s_seg', 'yolov8x', 'yolov9c', 'yolox_l_leaky', 'yolox_s_leaky', 'yolox_s_wide_leaky', 'yolox_tiny', 'zero_dce', 'zero_dce_pp')

i think model name append function, can you explain it?

Also, I nedd yaml file and alls file format

there are no reference about yaml, alls script

thank you

Hey @JBK,

You’re spot on - eva02_large_patch14_448 isn’t in the default model list, which is why the CLI is rejecting it. Good news though: you can absolutely work around this using custom config files.

You can run the compiler using just your own .yaml and .alls files, even for models not in the official list.

Here’s what you need to do:

Create Your Config Files

You’ll need two files:

  1. A YAML config (eva02_large_patch14_448.yaml) that defines your model structure, paths, and preprocessing
  2. An ALLS script (eva02_large_patch14_448.alls) for quantization settings

The key is making sure your YAML points to the ALLS file:

paths:
  alls_script_path: path/to/eva02_large_patch14_448.alls
  model_path: path/to/your/model.pth
  # ... other paths

I’d suggest checking out the existing ViT config files in the repo to see how they’re structured. You can use them as templates for your EVA02 model:

Take a look at these for reference:

Since EVA02 is also a Vision Transformer, these should give you a pretty good starting point.

Run the Compiler

Once you have both files set up, you can run:

hailomz compile --config path/to/eva02_large_patch14_448.yaml

This bypasses the model name validation entirely since you’re providing the config directly.

Full Pipeline (Recommended)

If you want to run the complete flow step by step:

hailomz parse --config path/to/eva02_large_patch14_448.yaml
hailomz optimize --config path/to/eva02_large_patch14_448.yaml  
hailomz compile --config path/to/eva02_large_patch14_448.yaml

The compiler will use your custom config and ALLS file instead of looking for the model in the predefined list. Just make sure your YAML schema is correct and all the paths are valid.

Hello @omria

Thank you for your detail

I tried that but errors occur

1. URL Errors

I writed .yaml and run hailomz compile --yaml my_yaml.yaml
(–config parser didn’t work)

In yaml, paths request URL link, but that model eva02_L_pt_m38m_medft_in21k_ft_in1k_p14.pt doesn’t have any zipfile link to hailo use them

so i just input any model link https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/Classification/vit_tiny/pretrained/2023-08-29/vit_tiny_bn.zip because i append my model file path.(I think hailomz only download that link but no ued)

No wander that errors occur

<Hailo Model Zoo INFO> Start run for network vit_tiny_bn ...
<Hailo Model Zoo INFO> Initializing the hailo8 runner...
vit_tiny_bn.zip: 100%|███████████████████████████████████████████████████████████████████████████████████████████████| 20.4M/20.4M [00:04<00:00, 4.76MB/s]
[info] Translation started on Tensorflow model vit_tiny_bn
Traceback (most recent call last):
  File "/hailo_test/venv/bin/hailomz", line 33, in <module>
    sys.exit(load_entry_point('hailo-model-zoo', 'console_scripts', 'hailomz')())
  File "/hailo_test/hailo_model_zoo/hailo_model_zoo/main.py", line 122, in main
    run(args)
  File "/hailo_test/hailo_model_zoo/hailo_model_zoo/main.py", line 111, in run
    return handlers[args.command](args)
  File "/hailo_test/hailo_model_zoo/hailo_model_zoo/main_driver.py", line 219, in compile
    _ensure_optimized(runner, logger, args, network_info)
  File "/hailo_test/hailo_model_zoo/hailo_model_zoo/main_driver.py", line 57, in _ensure_optimized
    _ensure_parsed(runner, logger, network_info, args)
  File "/hailo_test/hailo_model_zoo/hailo_model_zoo/main_driver.py", line 83, in _ensure_parsed
    parse_model(runner, network_info, ckpt_path=args.ckpt_path, results_dir=args.results_dir, logger=logger)
  File "/hailo_test/hailo_model_zoo/hailo_model_zoo/core/main_utils.py", line 95, in parse_model
    model_name = translate_model(runner, network_info, ckpt_path, tensor_shapes=start_node_shapes)
  File "/hailo_test/hailo_model_zoo/hailo_model_zoo/utils/parse_utils.py", line 34, in translate_model
    runner.translate_tf_model(ckpt_path, model_name,
  File "/hailo_test/venv/lib/python3.10/site-packages/hailo_sdk_common/states/states.py", line 16, in wrapped_func
    return func(self, *args, **kwargs)
  File "/hailo_test/venv/lib/python3.10/site-packages/hailo_sdk_client/runner/client_runner.py", line 1222, in translate_tf_model
    parser.translate_tf_model(
  File "/hailo_test/venv/lib/python3.10/site-packages/hailo_model_optimization/tools/subprocess_wrapper.py", line 122, in parent_wrapper
    func(self, *args, **kwargs)
  File "/hailo_test/venv/lib/python3.10/site-packages/hailo_sdk_client/sdk_backend/parser/parser.py", line 69, in translate_tf_model
    nn_framework, graph, values, node_names = detect_tf_nn_framework(model_path, valid_net_name)
  File "/hailo_test/venv/lib/python3.10/site-packages/hailo_sdk_client/tools/tf_proto_helper.py", line 128, in detect_tf_nn_framework
    raise UnsupportedModelError(
hailo_sdk_common.hailo_nn.exceptions.UnsupportedModelError: Failed to detect TF NN framework, please specify model origin (from NNFramework values - TENSORFLOW/TENSORFLOW2/TENSORFLOW_LITE).
  • how to input correct my model URL?
    • I upload my model huggingface repo but, it link is not same function hailo default URL)
  • I used my model format(onnx from pytorch), but yamlfile request me Tensorflow, how to fix it?

2. reference alls, yaml Issue

Thank you for the link

but, when i customized my model.yaml, i can’t understand yaml structure

i think alls file is work for models layer to quantization

yaml file is work for hailomz parse, compile .. that information need to convert .hef

  • In yaml, what items must be included? info, parser, paths.. etc or only paths?(it’s just example)
  • alls same. other network alls file is simple, but attatched link allsis too many code written

Hey @JBK,

I had a look at youre model and since you’re working with a custom model that’s quite different from anything in our Model Zoo, I’d recommend compiling it directly using the Hailo Dataflow Compiler (DFC).
Its easier for compilation.
Here’s how to set it up:

Basic YAML Template

network:
  name: eva02_large_patch14_448
  class: Classification
  input_shape: [1, 3, 448, 448]

parser:
  model_type: onnx
  inputs:
    input: [1, 3, 448, 448]
  outputs:
    output: null

paths:
  model_path: /path/to/your/model.onnx
  output_dir: ./hailo_output
  alls_script_path: ./eva02.alls

Simple ALLS Script

set_input_mean_std("input", mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])
set_input_type("input", "float32")
set_output_type("output", "float32")

Compilation Steps

# Parse your model
hailo parse --yaml eva02_large_patch14_448.yaml

# Optimize (recommended)
hailo optimize --yaml eva02_large_patch14_448.yaml

# Compile to HEF
hailo compile --yaml eva02_large_patch14_448.yaml

Use hailo analyze --onnx /path/to/model.onnx first to check your model’s input/output names and shapes.

Please try this and update me , start with the parser , this way you will know if you need to modify the onnx or anything else !

Hi @omria !

Thank you for the detail

I tried that command in my DFC(version 3.28), but there is no --yaml params

There is only exist hailo modelzoo(a.k.a hailomz) command

This is my command i tried

# work! --> create har file
hailo parser onnx ./BK/Custom/250610_eva02_base_patch_448.onnx --net-name eva02_base_patch_448_bk --start-node-names input --end-node-names output --hw-arch hailo8

# work! --> create optimize har file
hailo optimize ./BK/Custom/eva02_base_patch_448_bk.har --output-har-path ./BK/Custom/eva02_base_patch_448_opt_bk.har --hw-arch hailo8 --calib-set-path ./BK/Custom/250605_seoyeon_concat_cropped_for_calib_numpy

# didn't work
hailo compiler ./BK/Custom/eva02_base_patch_448_opt_bk.har --hw-arch hailo8 --output-dir ./BK/Custom --model-script ./BK/Custom/eva02_base_patch_448.alls

In the hailo compile step, without --model-script error occur

[info] Current Time: 12:41:17, 06/11/25
[info] CPU: Architecture: x86_64, Model: 12th Gen Intel(R) Core(TM) i7-12700, Number Of Cores: 20, Utilization: 0.1%
[info] Memory: Total: 15GB, Available: 11GB
[info] System info: OS: Linux, Kernel: 6.8.0-60-generic
[info] Hailo DFC Version: 3.28.0
[info] HailoRT Version: Not Installed
[info] PCIe: No Hailo PCIe device was found
[info] Running `hailo compiler ./BK/Custom/eva02_base_patch_448_opt_bk.har --hw-arch hailo8 --output-dir ./BK/Custom`
[info] Compiling network
[info] To achieve optimal performance, set the compiler_optimization_level to "max" by adding performance_param(compiler_optimization_level=max) to the model script. Note that this may increase compilation time.
[info] Loading network parameters
[info] Starting Hailo allocation and compilation flow
[info] Adding collapsed format conversion after conv4
[info] Adding collapsed format conversion after conv8
[info] Adding collapsed format conversion after conv16
[info] Adding collapsed format conversion after conv22
[info] Adding collapsed format conversion after conv28
[info] Adding collapsed format conversion after conv34
[info] Adding collapsed format conversion after conv40
[info] Adding collapsed format conversion after conv46
[info] Adding collapsed format conversion after conv52
[info] Adding collapsed format conversion after conv58
[info] Adding collapsed format conversion after conv64
[info] Adding collapsed format conversion after conv70
[error] Mapping Failed (allocation time: 1s)
Titan defuse for node matmul1 has failed

[error] Failed to produce compiled graph
[error] BackendAllocatorException: Compilation failed: Titan defuse for node matmul1 has failed

That error means,GPT worked, can’t allocate matmul function

.allsfile is

performance_param("compiler_optimization_level", "max"):
force_fallback_layer("matmul1"):

But, hailo compile step, when i use --model-script error occur

Traceback (most recent call last):
  File "/hailo_test/venv/bin/hailo", line 8, in <module>
    sys.exit(main())
  File "/hailo_test/venv/lib/python3.10/site-packages/hailo_sdk_client/tools/cmd_utils/main.py", line 111, in main
    ret_val = client_command_runner.run()
  File "/hailo_test/venv/lib/python3.10/site-packages/hailo_sdk_client/tools/cmd_utils/base_utils.py", line 68, in run
    return self._run(argv)
  File "/hailo_test/venv/lib/python3.10/site-packages/hailo_sdk_client/tools/cmd_utils/base_utils.py", line 89, in _run
    return args.func(args)
  File "/hailo_test/venv/lib/python3.10/site-packages/hailo_sdk_client/tools/compiler_cli.py", line 52, in run
    self._compile(
  File "/hailo_test/venv/lib/python3.10/site-packages/hailo_sdk_client/tools/compiler_cli.py", line 79, in _compile
    runner.load_model_script(alls)
  File "/hailo_test/venv/lib/python3.10/site-packages/hailo_sdk_common/states/states.py", line 16, in wrapped_func
    return func(self, *args, **kwargs)
  File "/hailo_test/venv/lib/python3.10/site-packages/hailo_sdk_client/runner/client_runner.py", line 477, in load_model_script
    self._sdk_backend.load_model_script_from_file(model_script, append)
  File "/hailo_test/venv/lib/python3.10/site-packages/hailo_sdk_client/sdk_backend/sdk_backend.py", line 391, in load_model_script_from_file
    self._script_parser.parse_script_from_file(model_script_path, nms_config, append)
  File "/hailo_test/venv/lib/python3.10/site-packages/hailo_sdk_client/sdk_backend/script_parser/model_script_parser.py", line 301, in parse_script_from_file
    return self.parse_script(f.read(), append, nms_config_file)
  File "/hailo_test/venv/lib/python3.10/site-packages/hailo_sdk_client/sdk_backend/script_parser/model_script_parser.py", line 371, in parse_script
    script_grammar.parseString(input_script, parseAll=True)
  File "/hailo_test/venv/lib/python3.10/site-packages/pyparsing.py", line 1943, in parseString
    loc, tokens = self._parse(instring, 0)
  File "/hailo_test/venv/lib/python3.10/site-packages/pyparsing.py", line 1683, in _parseNoCache
    loc, tokens = self.parseImpl(instring, preloc, doActions)
  File "/hailo_test/venv/lib/python3.10/site-packages/pyparsing.py", line 4781, in parseImpl
    return super(ZeroOrMore, self).parseImpl(instring, loc, doActions)
  File "/hailo_test/venv/lib/python3.10/site-packages/pyparsing.py", line 4697, in parseImpl
    loc, tokens = self_expr_parse(instring, loc, doActions, callPreParse=False)
  File "/hailo_test/venv/lib/python3.10/site-packages/pyparsing.py", line 1683, in _parseNoCache
    loc, tokens = self.parseImpl(instring, preloc, doActions)
  File "/hailo_test/venv/lib/python3.10/site-packages/pyparsing.py", line 4069, in parseImpl
    loc, exprtokens = e._parse(instring, loc, doActions)
  File "/hailo_test/venv/lib/python3.10/site-packages/pyparsing.py", line 1683, in _parseNoCache
    loc, tokens = self.parseImpl(instring, preloc, doActions)
  File "/hailo_test/venv/lib/python3.10/site-packages/pyparsing.py", line 4254, in parseImpl
    ret = e._parse(instring, loc, doActions)
  File "/hailo_test/venv/lib/python3.10/site-packages/pyparsing.py", line 1716, in _parseNoCache
    tokens = fn(instring, tokensStart, retTokens)
  File "/hailo_test/venv/lib/python3.10/site-packages/pyparsing.py", line 1316, in wrapper
    ret = func(*args[limit[0]:])
  File "/hailo_test/venv/lib/python3.10/site-packages/hailo_sdk_client/sdk_backend/script_parser/model_script_parser.py", line 604, in _parse_void_func
    new_cmd = PerformanceParamCommand.from_tokens(tokens)
  File "/hailo_test/venv/lib/python3.10/site-packages/hailo_sdk_client/sdk_backend/script_parser/commands.py", line 3805, in from_tokens
    fps = args[1]["fps"]
TypeError: string indices must be integers

Hey JBK,

Just a heads up - the --yaml parameter only works with newer DFC versions (3.30 and above).

Also, one small thing to fix - you’ll want to remove the colons from these calls:

performance_param(“compiler_optimization_level”, “max”)
force_fallback_layer(“matmul1”)

Please Update me with the results !

Thank you for reply

I tried new DFC version install and run command hailo compiler with --yaml, but there is no --yaml params (also command compile didn’t exist)

[info] Current Time: 09:23:26, 06/13/25
[info] CPU: Architecture: x86_64, Model: 12th Gen Intel(R) Core(TM) i7-12700, Number Of Cores: 20, Utilization: 0.2%
[info] Memory: Total: 15GB, Available: 12GB
[info] System info: OS: Linux, Kernel: 6.8.0-60-generic
[info] Hailo DFC Version: 3.31.0
[info] HailoRT Version: Not Installed
[info] PCIe: No Hailo PCIe device was found
[info] Running `hailo compiler --yaml /home/interx/hailo_compile/BK/Custom/eva02_base_patch_448.yaml`
usage: hailo [-h] [--version]
             {analyze-noise,compiler,params-csv,parser,profiler,optimize,tb,visualizer,tutorial,har,join,har-onnx-rt,runtime-profiler,dfc-studio,help}
             ...
hailo: error: unrecognized arguments: --yaml