add TensorRT guidance + updated speed numbers
Browse files- README.md +27 -0
- __pycache__/app.cpython-312.pyc +0 -0
README.md
CHANGED
|
@@ -28,3 +28,30 @@ Models, ONNX/ncnn files, training configs and the architecture live at
|
|
| 28 |
**NERVE links:** [models & configs](https://huggingface.co/Phips/NERVE) · [try it online (ZeroGPU)](https://huggingface.co/spaces/Phips/nerve) · [convert a checkpoint](https://huggingface.co/spaces/Phips/nerve-convert) · [local app](https://github.com/Phhofm/nerve-app) · [train your own (Colab)](https://github.com/Phhofm/nerve-train)
|
| 29 |
|
| 30 |
Runs on ZeroGPU; large images are processed in tiles. Apache-2.0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
**NERVE links:** [models & configs](https://huggingface.co/Phips/NERVE) · [try it online (ZeroGPU)](https://huggingface.co/spaces/Phips/nerve) · [convert a checkpoint](https://huggingface.co/spaces/Phips/nerve-convert) · [local app](https://github.com/Phhofm/nerve-app) · [train your own (Colab)](https://github.com/Phhofm/nerve-train)
|
| 29 |
|
| 30 |
Runs on ZeroGPU; large images are processed in tiles. Apache-2.0.
|
| 31 |
+
|
| 32 |
+
## Running it fastest (TensorRT)
|
| 33 |
+
|
| 34 |
+
This Space runs on ZeroGPU with PyTorch. For **maximum speed on your own
|
| 35 |
+
NVIDIA GPU**, export a static-shape fp16 ONNX and enable the two TensorRT
|
| 36 |
+
builder options we found fastest (`builderOptimizationLevel=5` + CUDA graphs):
|
| 37 |
+
|
| 38 |
+
```python
|
| 39 |
+
import onnxruntime as ort
|
| 40 |
+
|
| 41 |
+
sess = ort.InferenceSession(
|
| 42 |
+
"4x_NERVE_OTF_gan_1x3x480x640_fp16.onnx",
|
| 43 |
+
providers=[("TensorrtExecutionProvider", {
|
| 44 |
+
"trt_fp16_enable": True,
|
| 45 |
+
"trt_builder_optimization_level": 5,
|
| 46 |
+
"trt_cuda_graph_enable": True,
|
| 47 |
+
"trt_engine_cache_enable": True,
|
| 48 |
+
"trt_engine_cache_path": "trt_cache",
|
| 49 |
+
"trt_timing_cache_enable": True,
|
| 50 |
+
}), "CUDAExecutionProvider"],
|
| 51 |
+
)
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
Measured on an RTX 3060 at `1x3x480x640` fp16 (mean of 50 runs): NERVE 2x
|
| 55 |
+
**33.24 → 31.80 ms**, NERVE 4x **38.43 → 33.82 ms**. Full numbers, the SPAN_S /
|
| 56 |
+
compact comparison, and notes: see the
|
| 57 |
+
[release page](https://huggingface.co/Phips/NERVE#update--2026-09-30-tensorrt-builder-options-how-to-run-nerve-fastest).
|
__pycache__/app.cpython-312.pyc
CHANGED
|
Binary files a/__pycache__/app.cpython-312.pyc and b/__pycache__/app.cpython-312.pyc differ
|
|
|