| --- |
| license: apache-2.0 |
| tags: |
| - image-super-resolution |
| - image-to-image |
| - mlx |
| - apple-silicon |
| - super-resolution |
| - neural-heat-fields |
| base_model: |
| - prs-eth/thera-rdn-air |
| - prs-eth/thera-rdn-pro |
| library_name: mlx |
| language: |
| - en |
| pipeline_tag: image-to-image |
| --- |
| |
| <div align="center"> |
|
|
| # ✨ thera-mlx |
|
|
| **Aliasing-Free Arbitrary-Scale Super-Resolution for Apple Silicon** |
|
|
| *An [MLX](https://github.com/ml-explore/mlx) port of [Thera](https://therasr.github.io) — running natively on M1/M2/M3/M4* |
|
|
| [](https://github.com/madeleinelmuller/thera-mlx) |
| [](https://github.com/madeleinelmuller/thera-mlx/blob/main/LICENSE) |
| [](https://arxiv.org/abs/2311.17643) |
|
|
| **128×128 → 512×512 in ~1.5 seconds on M1** · Arbitrary scale factors · Web UI + CLI · Video support |
|
|
| </div> |
|
|
| --- |
|
|
| ## Model Description |
|
|
| **thera-mlx** contains MLX-format weights for the [Thera](https://therasr.github.io) super-resolution model, converted from the original JAX/Flax checkpoints released by [PRS-ETH](https://prs.igp.ethz.ch/) (ETH Zurich). |
|
|
| Thera uses **neural heat fields** to perform aliasing-free image super-resolution at *any* scale factor — not just 2× or 4×. This repo provides two variants: |
|
|
| | File | Model | Speed | Quality | |
| |------|-------|-------|---------| |
| | `weights-air.safetensors` | Air | ~1.5s for 128→512px on M1 | Great | |
| | `weights-pro.safetensors` | Pro (+ SwinIR refinement) | ~5s for 128→512px on M1 | Best | |
|
|
| ## Usage |
|
|
| ```bash |
| git clone https://github.com/madeleinelmuller/thera-mlx |
| cd thera-mlx |
| pip install -r requirements.txt |
| |
| # Download weights (pulls from this repo automatically) |
| python run.py convert --model air |
| python run.py convert --model pro |
| |
| # Launch web UI |
| python run.py |
| |
| # Or use CLI |
| python run.py run input.png output.png --scale 4 --model air |
| ``` |
|
|
| See the full [GitHub repository](https://github.com/madeleinelmuller/thera-mlx) for complete documentation. |
|
|
| ## Original Weights |
|
|
| The weights in this repository are converted from: |
| - [`prs-eth/thera-rdn-air`](https://huggingface.co/prs-eth/thera-rdn-air) |
| - [`prs-eth/thera-rdn-pro`](https://huggingface.co/prs-eth/thera-rdn-pro) |
|
|
| ## Citation |
|
|
| If you use this in your work, please cite the original Thera paper: |
|
|
| ```bibtex |
| @article{becker2023thera, |
| title = {Thera: Aliasing-Free Arbitrary-Scale Super-Resolution with Neural Heat Fields}, |
| author = {Becker, Alexander and Caye Daudt, Rodrigo and Narnhofer, Dominik and |
| Peters, Torben and Metzger, Nando and Wegner, Jan Dirk and Schindler, Konrad}, |
| journal = {arXiv preprint arXiv:2311.17643}, |
| year = {2023} |
| } |
| ``` |
|
|
| **Original resources:** |
| - Paper: [arxiv.org/abs/2311.17643](https://arxiv.org/abs/2311.17643) |
| - Project page: [therasr.github.io](https://therasr.github.io) |
| - Original HF weights: [huggingface.co/prs-eth](https://huggingface.co/prs-eth) |
|
|