ComfyUI-Upscaler-Tensorrt
ComfyUI-Upscaler-Tensorrt copied to clipboard
readme is unclear (update it with more detail)
Took me a few days to understand how to build the engine, so im putting this here to help other people:
-
git clone the repo to your custom_nodes directory
-
navigate command prompt to ComfyUI-Upscaler-Tensorrt directory and install it:
pip install -r requirements.txt
-
download onnx files to this directory:
..\ComfyUI\app\models\tensorrt\upscaler\onnx
-
run engine builder script from ComfyUI-Upscaler-Tensorrt directory to build the engine.
python export_trt.py
Enter the path to save the TensorRT engine (e.g ./realesrgan.engine):..\ComfyUI\app\models\tensorrt\upscaler\4x_foolhardy_Remacri.engine
Enter the path to the ONNX model (e.g ./realesrgan.onnx):..\ComfyUI\app\models\tensorrt\upscaler\onnx\4x_foolhardy_Remacri.onnx
- do not create a .engine directory/file before you run the script, it will automatically create this file for you. just give it the filepath for the future .engine file , see my example above
- there should not be quotes '' around the paths
once the engine(s) are built!!
- open the node in ComfyUi and place it at the end of your IMAGE chain
right click >> add node >> tensorrt >> Upscale Tensorrt
- pick your .engine file and run it, it should upscale the image :)