Image-to-Image
TensorRT
rtx-5090
syncfix
SyncFix-RTX-5090 / README.md
a2a2a2a's picture
Fix license and notice links
205e694 verified
|
Raw History Blame Contribute Delete
3.46 kB
---
license: other
license_name: syncfix-model-and-runtime-terms
license_link: https://huggingface.co/agents2agents/SyncFix-RTX-5090/blob/main/LICENSE
pipeline_tag: image-to-image
tags:
- tensorrt
- rtx-5090
- syncfix
---
# SyncFix for RTX 5090
Process three degraded views and one reference image to produce three corrected
views. Inputs must be RGB and may have different dimensions. Each output has the
same width and height as its corresponding degraded input image.
## Requirements
- Linux x86_64 with glibc 2.35 or newer, and an NVIDIA GeForce RTX 5090
with 32 GB memory.
- NVIDIA driver 580.178.04 or newer; one visible GPU.
- Python 3.12, PyTorch 2.10.0+cu128, Triton 3.6.0, NumPy 1.26.4,
Pillow 11.3.0 and safetensors 0.6.2.
- TensorRT 11.3.0 build 99 for CUDA 12.9, including `libnvinfer.so.11` and
`libnvinfer_plugin.so.11`.
Use the specified software versions. Compatible newer NVIDIA drivers are
supported; a matching system CUDA toolkit is not required. If TensorRT is not
on the library search path, pass `--trt-lib-dir /path/to/TensorRT/lib`.
Obtain the specified runtime from [NVIDIA TensorRT downloads](https://developer.nvidia.com/tensorrt).
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-RTX-5090 --local-dir syncfix-rtx5090
cd syncfix-rtx5090
```
```bash
bash setup.sh
source .venv/bin/activate
python verify.py
python verify.py --run --trt-lib-dir /path/to/TensorRT/lib
```
`verify.py` checks the downloaded files using Python alone. `--run` also checks inference
using the included example and a group of images with different dimensions.
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 \
--trt-lib-dir /path/to/TensorRT/lib
```
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_5090 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", trt_lib_dir="/path/to/TensorRT/lib") 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-RTX-5090/blob/main/LICENSE)
and [NOTICE](https://huggingface.co/agents2agents/SyncFix-RTX-5090/blob/main/NOTICE)
for applicable terms and attribution.