Image-to-Image
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:

hf download agents2agents/SyncFix-H100 --local-dir syncfix-h100
cd syncfix-h100
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

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:

{"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"}
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

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 and NOTICE for applicable terms and attribution.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support