Task, solution, and backbone management
Napari-OmniEM lets you manage tasks, solutions, and shared model backbones from the GUI. Open ⚙️ Preferences → Tasks and Models, then select Solutions or Backbones.
This page covers persistent model management: saved task configurations, solution registrations, backbone registrations, and managed weight files. It is separate from unloading active models from GPU or CPU memory in the current napari session.
Concepts
Relationship to the omniem package
omniem is the core Python
package that defines the OmniEM model architecture, shared-backbone and
task-head structure, model loading, and model-config schema. Napari-OmniEM
builds its task and solution management interface on these concepts. The
model configuration YAML selected in Add Solution follows
omniem.config.ModelConfig and is parsed by the omniem package; the plugin
then adds its own task registration, persistence, and GUI metadata.
- A Task defines the problem type: Image-to-Image (for example, denoising or super-resolution) or Image-to-Label (for example, mitochondria segmentation).
- A Solution is a specific model and configuration that solves a task. A task may hold several solutions; each solution belongs to exactly one task.
- A Backbone is the shared encoder used by one or more solutions. Each solution also has a smaller, task-specific head.

Managing tasks
New Task
Click New Task and provide:
- Task Type: Image-to-Image or Image-to-Label.
- Full Name: the name shown in the GUI selection menus (must be unique).
- Short Name: a concise identifier used to store the task's config file (must be unique).
For an Image-to-Label task, also define each output label and its meaning. Each label corresponds to one model output class.

Enable / Disable Task
Select a task, then use Enable Task / Disable Task (only the applicable one is active). A disabled task does not appear in the in-memory or local inference menus. Its solutions remain saved and reappear when you re-enable the task.
Delete Task
Delete Task permanently removes a task and its config. If the task's solutions have head files in the managed weights folder, the plugin asks whether to delete or keep those files. This action never deletes the shared backbone.
Dump Task / Import Task (sharing)
To move an entire task between installations:
- Dump Task writes only the task description: a
.yamlfile listing its solutions. It does not copy weights. - Import Task reads that
.yamlfile and registers the task under a unique short name that you provide. You also select the folder containing the weight files.
Because Dump Task writes only the description, sharing a task requires both the dumped YAML and the weight files:
- Dump Task → get
mytask.yaml. - Export Weights for each solution into a folder; see Export Weights.
- Send the YAML + the weights folder.
- The recipient uses Import Task, selects the YAML, points at the weights folder, and gives a unique short name.
Head files must match the YAML
Every solution's head file must be present in the selected weights folder and its filename must match the name recorded in the dumped YAML. If you renamed a Split export, update the YAML (or re-export) so the names line up, otherwise the importer cannot find the weights.
Managing solutions
Add Solution
Use Add Solution to import a compatible, fine-tuned OmniEM model into the selected task. Before continuing, prepare the model-config and weight files described in Custom model requirements.
- Open Preferences (⚙️) → Tasks and Models → Solutions.
- Select the task that the model belongs to, then click Add Solution.
- Select the model config (
.yaml). Its parsed contents are displayed as read-only so that you can confirm the architecture, task type, output-channel count, and normalization settings. - Choose an import strategy:
- Full-scale (.pt) imports a complete checkpoint. The plugin splits it into a shared backbone and task head. It reuses an already registered matching backbone; otherwise, you can assign the new backbone a display name.
- Head-only (split .pt) imports a compatible head file. Select the matching registered backbone that the head requires.
- Select the weights file and confirm. The plugin validates the artifacts, copies the head into the managed weights folder, and registers the solution.

If the import is rejected
The plugin validates the model before committing the solution. Common messages include:
| Message | Meaning |
|---|---|
| Unsupported model or encoder | The config uses an architecture or encoder that this Napari-OmniEM version does not support. |
| Task type mismatch | The config's task type does not match the selected task. |
| Label count mismatch | An Image-to-Label model's output-channel count does not match the task's labels. |
| Backbone or encoder mismatch | The head and selected backbone are incompatible. |
| Head file validation failed | The head lacks the required metadata or was created for a different backbone. |
Solution metadata cannot be changed after a solution is added. To change it, remove the solution and add it again.
Remove Solution
Select a solution and click Remove Solution. If the solution's head file is in the managed weights folder, you can delete the file, keep it, or cancel. Removing a solution deletes it from the task config; a shared backbone is never removed by this action.

Export Weights
Select a solution and click Export Weights, then choose an output format:
- Combined writes one self-contained
.ptfile containing the backbone and head. - Split writes separate backbone and head files. This format avoids sharing another copy of a backbone that the recipient already has.
To share a complete task, export the weights for each solution and use the Dump Task / Import Task procedure.
Managing backbones
Every solution uses a shared backbone, a large encoder such as EM-DINO (EMDINOv1-ViTL), plus a smaller task-specific head. A backbone is loaded once and reused by every solution that references it, reducing GPU memory use.
Open Preferences (⚙️) → Tasks and Models → Backbones to manage the backbone registry.
Backbone inventory
The Backbones table lists one row per registered backbone:
| Column | Meaning |
|---|---|
| Display Name | A friendly name, which defaults to the tag. |
| Tag | A short content fingerprint that identifies the weights. |
| Arch | The encoder architecture, such as emdinov1. |
| Solutions | The number of task heads that reference the backbone. |
| Actions | Rename and Remove actions for the backbone. |
The built-in backbone (4246a479, EMDINOv1-ViTL) is always registered, and
its Remove action is disabled.
Rename changes only the display name, up to 64 characters. It does not change the backbone tag.

Add a backbone
Click + Add Backbone, then choose one of these methods:
- Register split .pt selects a standalone backbone that has already been split from a checkpoint. The file is copied into the managed weights folder and registered.
- Extract from combined .pt selects a full checkpoint. The backbone is extracted, stored, and registered without modifying the original file.

Remove a backbone
The effect of Remove depends on the backbone:
- A built-in backbone cannot be removed.
- Removal is blocked while a model is loaded on the backbone or a solution references it. Unload the model or remove the referencing solutions first.
- An external file, stored outside the managed weights folder, is removed from the registry without deleting the physical file.
- For an unreferenced managed file, you can delete the file or remove only its registry entry.
This is persistent removal
Preferences → Backbones → Remove changes the persistent backbone registry and can optionally delete the weight file. Unloading an active backbone from session memory is a separate operation and does not change the registry or its files.
Backbone settings
Configure these options under Preferences → Settings → General settings; see the Preferences reference:
- Weights storage folder controls where the plugin stores managed
backbone_<tag>.ptandhead_*.ptfiles. When you change the folder, the plugin offers to move the existing managed files. - Backbone cache size controls how many distinct backbones may remain loaded at once.
Best practices
- Use descriptive task and solution names.
- Dump a task (and export its weights) before major changes.
- Keep your weights in the managed weights storage folder so the plugin can find and move them for you.