| --- |
| license: apache-2.0 |
| library_name: braindecode |
| tags: |
| - eeg |
| - foundation-model |
| - braindecode |
| pipeline_tag: feature-extraction |
| --- |
| |
| # ZUNA (braindecode re-host) |
|
|
| Faithful re-host of the **ZUNA** EEG foundation-model encoder weights for use with |
| [braindecode](https://github.com/braindecode/braindecode). |
|
|
| - **Original model:** [`Zyphra/ZUNA`](https://huggingface.co/Zyphra/ZUNA) |
| - **Original code:** https://github.com/Zyphra/zuna |
| - **Paper:** Warner, C., Mago, J., Huml, J.R., Osman, M. and Millidge, B. (2026). |
| *ZUNA: Flexible EEG Superresolution with Position-Aware Diffusion Autoencoders.* |
| arXiv:2602.18478 |
| - **Original authors (Zyphra):** Chris Warner, Jonas Mago, Jon Huml, et al. |
| - **License:** Apache-2.0 (inherited from the upstream release) |
|
|
| ## Why this re-host |
|
|
| The braindecode `ZUNA` port loads these weights through |
| `ZUNA.from_pretrained(...)`. Re-hosting under the `braindecode` org gives a |
| stable, permanent location that the library can point to by default, so the |
| integration does not depend on the upstream repository staying unchanged. The |
| weights file is **bit-identical** to the upstream checkpoint (same SHA-256); |
| only the filename is normalised to the standard `model.safetensors`. |
|
|
| ## What is (and is not) pretrained |
|
|
| These are the pretrained **encoder** weights (a position-aware diffusion |
| autoencoder trained for EEG superresolution). The braindecode wrapper adds a |
| **classification head that is randomly initialised** and must be fine-tuned on |
| your downstream task — loading these weights alone does not give a trained |
| classifier. |
|
|
| ## Usage |
|
|
| ```python |
| from braindecode.models import ZUNA |
| |
| # Defaults to this repo (braindecode/ZUNA); n_chans / n_outputs are montage- |
| # and task-dependent and must be supplied. |
| model = ZUNA.from_pretrained(n_chans=19, n_outputs=4) |
| |
| # Inputs are 5 s EEG windows sampled at 256 Hz (n_times = 1280). |
| ``` |
|
|