ComfyUI_TensorRT
Run ComfyUI Easily with InstaSD
Skip the complex setup. InstaSD helps creative professionals build workflows and deploy them to the world:
- One-click deployment
- Any model, any node
- Powerful GPUs for rapid iteration
Available Nodes
STATIC_TRT_MODEL_CONVERSION
Documentation for the STATIC_TRT_MODEL_CONVERSION Node
Overview
The STATIC_TRT_MODEL_CONVERSION node is part of the ComfyUI TensorRT extension, designed to enhance performance on NVIDIA RTX™ Graphics Cards by using NVIDIA TensorRT. This node specializes in converting AI model checkpoints into static TensorRT engines for optimal use in stable diffusion models and related functionalities within the ComfyUI environment.
Functionality
The primary function of the STATIC_TRT_MODEL_CONVERSION node is to convert a stable diffusion model checkpoint into a static TensorRT engine. These engines are optimized for a specific resolution and batch size, potentially improving performance and efficiency by reducing VRAM usage compared to dynamic engines.
Inputs
The STATIC_TRT_MODEL_CONVERSION node requires the following input:
- Model Checkpoint: This is the AI model checkpoint that you want to convert into a TensorRT engine. It is typically provided by connecting the output of a Load Checkpoint Node to the input of this node.
Outputs
The node produces:
- TensorRT Engine: This is the optimized static engine derived from the provided checkpoint. It includes the specific settings for the resolution and batch size and is ready to be used with a TensorRT Loader node for accelerated image or video generation.
Usage in ComfyUI Workflows
To incorporate the STATIC_TRT_MODEL_CONVERSION node into a ComfyUI workflow:
- Load Checkpoint: Begin by loading an AI model checkpoint using the Load Checkpoint Node.
- Connect Nodes: Attach the output from the Load Checkpoint Node to the input of the
STATIC_TRT_MODEL_CONVERSIONnode. - Conversion Process: Set a meaningful filename to help identify your converted TensorRT model. Start the conversion process by queuing the prompt, which triggers the building of the static TensorRT engine.
- Completion: Once the conversion is complete, the generated TensorRT engine can be used in conjunction with a TensorRT Loader node to enable accelerated image or video generation.
Special Features and Considerations
- Static vs. Dynamic Engines: Static engines are geared towards a specific use case with fixed resolution and batch size parameters. This can lead to reduced VRAM consumption and optimal performance compared to the more flexible dynamic engines.
- VRAM Considerations: Static engines consume less VRAM than dynamic engines with a wide parameter range, making them a suitable choice for users working within fixed computational constraints.
- Engine Generation Time: The initial conversion process to create the static TensorRT engine takes time (approximately 3-10 minutes for image generation models), but subsequent model checkpoints will convert faster.
- Compatibility Limits: As of the current release, TensorRT engines created by the ComfyUI TensorRT extension do not support ControlNets or LoRAs. Future updates may expand compatibility.
By understanding these aspects, users can maximize the benefits of the STATIC_TRT_MODEL_CONVERSION node, optimizing their workflows for stable diffusion models on NVIDIA RTX GPUs with TensorRT support.