This project provides an experimental Tensorrt implementation for ultra fast face restoration inside ComfyUI.
Note: This project doesn't do pre/post processing. It only works on cropped faces for now.
If you like the project, please give sa star! ⭐
Note: The following results were benchmarked ComfyUI, using 100 similar frames
Device | MODEL | PRECISION | FPS |
---|---|---|---|
RTX 3090 | Codeformer | FP16 | 15.6 |
RTX 3090 | Gfqgan | FP32 | 13.1 |
Navigate to the ComfyUI /custom_nodes
directory
git clone https://github.com/yuvraj108c/ComfyUI-Facerestore-Tensorrt
cd ./ComfyUI-Facerestore-Tensorrt
pip install -r requirements.txt
-
Download one of the following onnx models:
-
Build tensorrt engines for these models by running:
python export_trt.py
-
Place the exported engines inside ComfyUI
/models/tensorrt/facerestore
directory
- Insert node by
Right Click -> tensorrt -> Face Restore Tensorrt
- Ubuntu 22.04 LTS, Cuda 12.4, Tensorrt 10.4.0, Python 3.10, RTX 3090 GPU
- Windows (Not tested, but should work)
- https://github.com/bychen7/Face-Restoration-TensorRT
- https://github.com/yuvraj108c/Codeformer-Tensorrt
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)