tensorrt>=10.0.1 onnx!=1.16.2










This node enables the best performance on NVIDIA RTX™ Graphics Cards
(GPUs) for Stable Diffusion by leveraging NVIDIA TensorRT.
Supports:
Requirements:
for best performance due to its size and computational intensity.
recommended.
is recommended.
The recommended way to install these nodes is to use the ComfyUI Manager
to easily install them to your ComfyUI instance.
You can also manually install them by git cloning the repo to your ComfyUI/custom_nodes folder and installing the requirements like:
cd custom_nodes
git clone https://github.com/comfyanonymous/ComfyUI_TensorRT
cd ComfyUI_TensorRT
pip install -r requirements.txt
NVIDIA TensorRT allows you to optimize how you run an AI model for your
specific NVIDIA RTX GPU, unlocking the highest performance. To do this,
we need to generate a TensorRT engine specific to your GPU.
You have the option to build either dynamic or static TensorRT engines:
specified by the min and max parameters. Best performance will occur
when using the optimal (opt) resolution and batch size, so specify opt
parameters for your most commonly used resolution and batch size.
provide the same performance boost as the optimal settings for the
dynamic engines.
Note: Most users will prefer dynamic engines, but static engines can be
useful if you use a specific resolution + batch size combination most of
the time. Static engines also require less VRAM; the wider the dynamic
range, the more VRAM will be consumed.
You can find different workflows in the workflows folder of this repo.
These .json files can be loaded in ComfyUI.
Model TensorRT Conversion node to ComfyUI
Node Model input.
filename prefix, add this filename after “tensorrt/”
The Model Conversion node will be highlighted while the TensorRT Engine
is being built.
Additional information about the model conversion process can be seen in
the console.
The first time generating an engine for a checkpoint will take awhile.
Additional engines generated thereafter for the same checkpoint will be
much faster. Generating engines can take anywhere from 3-10 minutes for
the image generation models and 10-25 minutes for SVD. SVD-XT is an
extremely extensive model – engine build times may take up to an hour.
TensorRT Engines are loaded using the TensorRT Loader node.
ComfyUI TensorRT engines are not yet compatible with ControlNets or
LoRAs. Compatibility will be enabled in a future update.
session, it will not show up in the TensorRT Loader until the
ComfyUI interface has been refreshed (F5 to refresh browser).
original model checkpoint, the MODEL output from the TensorRT Loader
will be connected to the Sampler.