# Model pipeline selection and configuration

{% hint style="info" %}
Nx Witness, Nx Go and Nx Meta will work in the same way for the configuration.
{% endhint %}

The device detail page is the central place to manage the model pipelines that the device should run. Pipelines are chains of one or more models that can run with the given video input from the device. Usually a device has a default pipeline configured after the plugin is enabled for the device.

### Add a new pipeline

When no pipelines are set, the only available option is to add a new pipeline:

<figure><img src="/files/CRqccNNsYtuh00wjsLCe" alt="AI Manager device panel showing no pipelines configured, with an Add A New Pipeline button"><figcaption><p>A device detail page without any pipelines</p></figcaption></figure>

Clicking the "Add A New Pipeline" button redirects you to the model catalogue.

### Selecting a model

In the model catalogue you can select a model to use in the new (or current) pipeline.

The top of the page will show a message that you are "Assigning a model to...".

If you have uploaded custom models, these will also be available in the catalogue.

<figure><img src="/files/KuIs8PagjK4GV8OE5pVb" alt="Models catalogue showing available AI models with View Details and Add To Pipeline buttons, with an Assigning a model to device banner at the top"><figcaption><p>The model catalogue — select a model to add to the pipeline</p></figcaption></figure>

{% hint style="warning" %}
Note that the model visibility is context sensitive. When you are browsing models you can see all models that are available to all organisations that you are a member of. If you are assigning a model to a device, only the models that are available for the organisation that the device belongs to are visible.
{% endhint %}

When a model is selected it will be assigned and downloaded to the server for the current device.

<figure><img src="/files/SLddGTjzMr2hjBJnLwFc" alt="Add or replace model dialog showing the model deployment is in progress with a spinner"><figcaption><p>The selected model is being deployed to the server</p></figcaption></figure>

You will be redirected to the device details page again, with the newly assigned model.

<figure><img src="/files/H88XurRuU5AOv5qCJtNN" alt="AI Manager device panel showing a single pipeline with People and Vehicles Detection model, sensitivity slider, postprocessor, and model resizing method options"><figcaption><p>The device detail page with a single pipeline containing one model</p></figcaption></figure>

### Add a chained model

Chained models are models that use the input of a parent model instead of processing the video from the device directly.

You add a chained model by clicking the "Add Chained Model" button next to the parent model name. You will be redirected to the model catalogue to select a chained model.

<figure><img src="/files/YkNpnSu2SqCp8feHhapC" alt="AI Manager device panel showing the Add Chained Model button highlighted with a tooltip"><figcaption><p>Model pipeline — click Add Chained Model to chain a model</p></figcaption></figure>

The way a chained model will use the input can be chosen by setting a chaining method, currently there are three modes and not all of them may be available at the same time:

* Direct - the chained model gets the output from the parent model as input
* Conditional - the chained model will only run if a field with a given name outputs "`true`". This is only available if the model itself returns a boolean value.
* Feature extraction - the chained model will get the contents of the bounding boxes that have a certain label. This is only available if the model returns one or more named classes.

<figure><img src="/files/7TZgHRWyYQXifhVy8mfy" alt="Pipeline chaining method dropdown showing Direct and FeatureExtraction options with Feature Extraction Class set to Person"><figcaption><p>A model pipeline with chaining options and feature extraction class selection</p></figcaption></figure>

Choose the appropriate method, and when you have entered new data the pipeline form will change to indicate that settings need to be saved.

<figure><img src="/files/Q6Utw1aGywRdA5Y8srRa" alt="Device pipeline editor showing Cancel Changes and Save Pipelines buttons highlighted indicating unsaved changes"><figcaption><p>A model pipeline with changes that need to be saved</p></figcaption></figure>

The settings will be applied to the device when you click the "Save pipelines" button. The changes will be lingering for an hour, unless you either save or cancel the changes.

### Change a model in a pipeline

A parent model or a chained model can be replaced by clicking "Switch" button next to the model title. This will redirect you to the normal model selection process where you can select a replacement model.

The rest of the settings in the model pipeline are not affected, unless they are directly related to the model.

### Remove a chained model from a pipeline

Removing a chained model from a pipeline can be done by clicking the "Remove" button next to a **chained** model and the model will be removed directly.

Undoing is not possible, to undo this you will have to select the same model again and set the same chaining options and pre- and post-processing.

### Remove a pipeline

Removing a pipeline with all the models and settings can be done by clicking the "Remove" button next to a **parent** model in a pipeline and the full model pipeline with all associated settings and chained models will be removed.

Undoing is not possible, to restore the settings the same model pipeline must be rebuilt completely.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nx.docs.scailable.net/nx-ai-manager-v6.1.2/nx-ai-manager-plugin/configure-the-plugin/model-pipeline-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
