Joining multiple models into a single context

Following the info in another thread I have successfully combined two small models into a single context HEF.
how-to-quickly-switch-and-execute-two-single-context-hef-models

My application actually requires switching between 3 small models and I am sure they would fit within a single context as they are only 1MB in size each. Is it possible to call Join() twice to combine a third model into the context?

Hi @c_d,

Welcome to the Hailo Community!

Great job on successfully combining two models! We’re excited to see the full project you’re working on—it sounds promising!

To answer your question: Yes, you can combine multiple smaller models, including a third one, into a single HEF context file by using the Join() function in the HailoRT API. This function lets you integrate multiple models into a shared context, allowing them to execute within the same HEF.

Best Regards

Thanks @omria,

Any hints on how to achieve this? I checked the API docs and join() appears to only work on two networks at a time. Trying to call join() again on an already joined network throws an error:

in join
    raise UnsupportedRunnerJoinException(
hailo_sdk_client.runner.exceptions.UnsupportedRunnerJoinException: Joining runners is only allowed when both contain native graphs, or both contain quantized graphs

@omria Bump, I could use some help with this please. I haven’t worked out how to achieve it yet.