Image-to-Image
PyTorch
ONNX
TensorRT
English
super-resolution
image-restoration
sisr
real-world-restoration
spandrel
chainner
transformer
attention
Instructions to use Phips/HEART with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- TensorRT
How to use Phips/HEART with TensorRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
move + expand 'Why HEART?' to second section
Browse files
README.md
CHANGED
|
@@ -36,6 +36,34 @@ real-world usable first, not benchmark-chasing. See
|
|
| 36 |
|
| 37 |
---
|
| 38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
## Quickstart
|
| 40 |
|
| 41 |
### As a trainer (want to train your own model)
|
|
@@ -107,22 +135,6 @@ All ONNX files are **dynamic-shape fp32, opset 17, onnxslim-optimized**.
|
|
| 107 |
|
| 108 |
---
|
| 109 |
|
| 110 |
-
## Why HEART?
|
| 111 |
-
|
| 112 |
-
- **~16.7M params**, ties HAT on PSNR at **~1.6× less VRAM** and faster.
|
| 113 |
-
- **FlashAttention/SDPA friendly**: no attention masks, no position-bias table
|
| 114 |
-
lookups (RIB replaces them with a dot product).
|
| 115 |
-
- **Stable bf16 AMP training** (i-LN) — no fp32 gymnastics.
|
| 116 |
-
- **Single-file pure PyTorch**, exports cleanly to dynamic ONNX.
|
| 117 |
-
- **Real-world capable**: OTF models trained on the full Real-ESRGAN
|
| 118 |
-
degradation chain restore lost texture on real photos, not just clean
|
| 119 |
-
bicubic downsamples.
|
| 120 |
-
|
| 121 |
-
Full architecture details, design rationale, and ablation results:
|
| 122 |
-
[`docs/EXPERIMENTS.md`](docs/EXPERIMENTS.md).
|
| 123 |
-
|
| 124 |
-
---
|
| 125 |
-
|
| 126 |
## Repository layout
|
| 127 |
|
| 128 |
```
|
|
|
|
| 36 |
|
| 37 |
---
|
| 38 |
|
| 39 |
+
## Why HEART?
|
| 40 |
+
|
| 41 |
+
There are strong SR networks already. Here's the honest case for HEART — and
|
| 42 |
+
when to pick something else.
|
| 43 |
+
|
| 44 |
+
**One-line pitch:** HAT-class quality at roughly half the memory, in a single
|
| 45 |
+
readable file that trains stably in bf16 and exports to dynamic ONNX.
|
| 46 |
+
|
| 47 |
+
**Why it's worth your time:**
|
| 48 |
+
- **Quality at lower cost.** Ties HAT on PSNR while using **~half the peak
|
| 49 |
+
VRAM**, and runs **~1.6x faster in bf16** inference.
|
| 50 |
+
- **FlashAttention / SDPA friendly.** No attention masks, no position-bias
|
| 51 |
+
table lookups — RIB replaces them with a dot product.
|
| 52 |
+
- **Stable, simple training.** i-LN keeps bf16 AMP stable with no fp32
|
| 53 |
+
gymnastics.
|
| 54 |
+
- **One file, exports cleanly.** Single-file pure PyTorch; dynamic ONNX on the
|
| 55 |
+
first try; no fusion step or fused/unfused checkpoint pairs.
|
| 56 |
+
- **Real-world capable.** OTF models are trained on the full Real-ESRGAN
|
| 57 |
+
degradation chain and restore real photos, not just clean bicubic downsamples.
|
| 58 |
+
|
| 59 |
+
**When to pick something else:** for maximum benchmark PSNR or a tiny mobile
|
| 60 |
+
model, use NERVE instead — HEART is the desktop / server quality tier.
|
| 61 |
+
|
| 62 |
+
Full architecture details, design rationale, and ablation results:
|
| 63 |
+
[`docs/EXPERIMENTS.md`](docs/EXPERIMENTS.md).
|
| 64 |
+
|
| 65 |
+
---
|
| 66 |
+
|
| 67 |
## Quickstart
|
| 68 |
|
| 69 |
### As a trainer (want to train your own model)
|
|
|
|
| 135 |
|
| 136 |
---
|
| 137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
## Repository layout
|
| 139 |
|
| 140 |
```
|