Instructions to use agents2agents/SyncFix-H100 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- TensorRT
How to use agents2agents/SyncFix-H100 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
File size: 3,721 Bytes
708d7f1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | ---
license: other
license_name: syncfix-model-and-runtime-terms
license_link: https://huggingface.co/agents2agents/SyncFix-H100/blob/main/LICENSE
pipeline_tag: image-to-image
tags:
- tensorrt
- h100
- syncfix
---
# SyncFix for NVIDIA H100
Process three degraded views and one reference image to produce three corrected
views. All four inputs must be RGB images of 1920x1080 pixels. Each output is an
RGB image of 1920x1080 pixels.
## Performance
On one NVIDIA H100 80GB HBM3, a warm request takes 88.8 ms (median; 90.5 ms at
the 95th percentile) over 30 seconds of consecutive requests. A request is three
degraded views and one reference image in and three corrected images out, all
1920x1080. The original PyTorch implementation, run in bfloat16 on the same GPU,
takes 486 ms for the same request. Model loading and the first inference, which
includes initialization and warmup, are excluded.
## Requirements
- Linux x86_64 with glibc 2.35 or newer, and one NVIDIA H100 with 80 GB
memory (reported as `NVIDIA H100 80GB HBM3`).
- NVIDIA driver 595.91.07; one visible GPU.
- Python 3.12, PyTorch 2.10.0+cu128, NumPy 1.26.4, Pillow 11.3.0,
safetensors 0.6.2 and diffusers 0.32.2.
- TensorRT 11.3.0 build 99 for CUDA 12, including its Python package.
Use the specified software versions. This package was validated with NVIDIA
driver 595.91.07; other driver versions are untested. A matching system CUDA
toolkit is not required. `setup.sh` installs
the Python requirements, including `tensorrt-cu12==11.3.0.99`. To use TensorRT
libraries from another location, pass `--trt-lib-dir /path/to/TensorRT/lib`.
On a machine with multiple GPUs, select one with `CUDA_VISIBLE_DEVICES`.
## Install and test
Download the package with the [Hugging Face CLI](https://huggingface.co/docs/huggingface_hub/guides/cli):
```bash
hf download agents2agents/SyncFix-H100 --local-dir syncfix-h100
cd syncfix-h100
```
```bash
bash setup.sh
source .venv/bin/activate
python verify.py
python verify.py --run
```
`verify.py` checks the downloaded files using Python alone. `--run` also checks
inference using the included example. Numerical checks allow small variation
between processes. The first inference includes initialization and warmup.
## Run
```bash
python run.py \
--degraded example/degraded_0.png example/degraded_1.png example/degraded_2.png \
--reference example/reference.png --seed 42 \
--output-dir /path/to/new-results
```
Choose a new or empty output directory. The command saves three PNGs and a
request record. Supplying a seed resets sampling for that request; omitting it
continues the current random state.
For multiple groups, save a JSONL file:
```json
{"id":"group000","degraded":["a.png","b.png","c.png"],"reference":"ref.png","seed":42}
{"id":"group001","degraded":["d.png","e.png","f.png"],"reference":"ref.png"}
```
```bash
python run.py --requests /data/scene.jsonl --output-dir /data/corrected
```
Image paths resolve relative to the request file. A JSON array is also accepted.
The model remains loaded across requests.
## Python
```python
from PIL import Image
from syncfix_h100 import Pipeline
paths = ["a.png", "b.png", "c.png", "reference.png"]
images = [Image.open(path).convert("RGB") for path in paths]
with Pipeline("/path/to/bundle") as model:
corrected = model.infer(images[:3], images[3], seed=42)
```
Create one pipeline per process, before initializing CUDA elsewhere. Use it
from its creating thread. Returned images remain valid after later requests.
See [LICENSE](https://huggingface.co/agents2agents/SyncFix-H100/blob/main/LICENSE)
and [NOTICE](https://huggingface.co/agents2agents/SyncFix-H100/blob/main/NOTICE)
for applicable terms and attribution.
|