- Home
- Custom Nodes
- ComfyUI_TensorRT
ComfyUI_TensorRT
The ComfyUI TensorRT Node enhances GPU performance for Stable Diffusion on NVIDIA RTX™ GPUs by integrating TensorRT technology. It supports models like Stable Diffusion 1.5/2.1/3.0, SDXL, SVD, etc., with specific system requirements. Installation can be done via ComfyUI Manager or manually. There are dynamic and static engine types, with dynamic preferred generally. Workflow instructions include building and using TensorRT engines. Current limitations involve ControlNet/LoRA incompatibility, and future updates are planned. The main function is to optimize Stable Diffusion performance on NVIDIA RTX™ GPUs using TensorRT, having support for multiple models, different engine types, and clear installation, workflow guidance while facing some limitations to be addressed later.\n\nThe ComfyUI TensorRT Node optimizes Stable Diffusion performance on NVIDIA RTX™ GPUs by integrating TensorRT, supports multiple models with specific VRAM requirements, offers dynamic and static engine types, provides installation and workflow guides, and has limitations like ControlNet/LoRA incompatibility to be resolved in future updates.
comfyanonymous
Description
ComfyUI TensorRT Node for Enhanced GPU Performance
This node optimizes Stable Diffusion performance on NVIDIA RTX™ GPUs by integrating NVIDIA TensorRT technology.
Supported Models
- Stable Diffusion 1.5/2.1/3.0
- SDXL & SDXL Turbo
- Stable Video Diffusion (SVD)
- Stable Video Diffusion-XT
- AuraFlow
- Flux
System Requirements
- NVIDIA RTX™ or GeForce RTX™ GPU
- SDXL/SDXL Turbo: 12GB+ VRAM recommended
- SVD: 16GB+ VRAM recommended
- SVD-XT: 24GB+ VRAM required
- Flux: 24GB+ VRAM currently needed
Installation Guide
Recommended Method
Use ComfyUI Manager for seamless installation.
Manual Installation
cd custom_nodes
git clone https://github.com/comfyanonymous/ComfyUI_TensorRT
cd ComfyUI_TensorRT
pip install -r requirements.txt
Technical Overview
TensorRT enables GPU-specific optimization for maximum AI model performance. Engine generation is required for your specific RTX GPU.
Engine Types
Dynamic Engines
- Supports resolution/batch size ranges
- Peak performance at optimal (opt) settings
- Specify min/max parameters
Static Engines
- Single resolution/batch size
- Matches dynamic engine opt performance
- Lower VRAM usage
Note: Dynamic engines generally preferred; static ideal for fixed workflows.
Workflow Instructions
Sample workflows available in the workflows folder (load .json files in ComfyUI).
Building TensorRT Engines
-
Add Load Checkpoint node
-
Connect to either:
- Static Model TensorRT Conversion node
- Dynamic Model TensorRT Conversion node
-
Link checkpoint model output to conversion node
-
Name your engine with "tensorrt/" prefix
-
Click Queue Prompt to begin building
- Conversion node highlights during build
- Console displays progress details
First-time builds take 3-10min (image models) or 10-25min (SVD). SVD-XT may require 60min.
Using TensorRT Engines
- Add TensorRT Loader node
- Refresh ComfyUI (F5) if engines don't appear
- Select engine from unet_name dropdown:
- Dynamic:
dyn-b-min-max-opt-h-min-max-opt-w-min-max-opt
- Static:
stat-b-opt-h-opt-w-opt
- Dynamic:
- Match model_type to engine type
- Connect original CLIP/VAE; route MODEL to Sampler
Current Limitations
- ControlNet/LoRA incompatibility (future update planned)
This version maintains all technical specifications, image references, and links while improving readability and SEO through structured headings and concise phrasing. The NVIDIA RTX™ and GPU-related keywords are preserved for search optimization.