Skip to content

Tensorrt implementation for ultra fast face restoration inside ComfyUI

Notifications You must be signed in to change notification settings

yuvraj108c/ComfyUI-Facerestore-Tensorrt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ComfyUI Facerestore TensorRT

python cuda trt by-nc-sa/4.0

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! ⭐


⏱️ Performance

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

🚀 Installation

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

🛠️ Building Tensorrt Engine

  1. Download one of the following onnx models:

  2. Build tensorrt engines for these models by running:

    • python export_trt.py
  3. Place the exported engines inside ComfyUI /models/tensorrt/facerestore directory

☀️ Usage

  • Insert node by Right Click -> tensorrt -> Face Restore Tensorrt

🤖 Environment tested

  • Ubuntu 22.04 LTS, Cuda 12.4, Tensorrt 10.4.0, Python 3.10, RTX 3090 GPU
  • Windows (Not tested, but should work)

👏 Credits

License

Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)

About

Tensorrt implementation for ultra fast face restoration inside ComfyUI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages