{"id":23233368,"url":"https://github.com/comfyanonymous/ComfyUI_TensorRT","last_synced_at":"2025-08-19T18:31:59.859Z","repository":{"id":242429681,"uuid":"809453881","full_name":"comfyanonymous/ComfyUI_TensorRT","owner":"comfyanonymous","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-06T18:38:49.000Z","size":2085,"stargazers_count":398,"open_issues_count":32,"forks_count":23,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-08-07T07:09:56.910Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/comfyanonymous.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-02T18:22:19.000Z","updated_at":"2024-08-07T06:57:43.000Z","dependencies_parsed_at":"2024-06-03T00:58:49.241Z","dependency_job_id":"6ed1d8d6-7428-4eb3-9dac-63ebd256a368","html_url":"https://github.com/comfyanonymous/ComfyUI_TensorRT","commit_stats":null,"previous_names":["comfyanonymous/comfyui_tensorrt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comfyanonymous%2FComfyUI_TensorRT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comfyanonymous%2FComfyUI_TensorRT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comfyanonymous%2FComfyUI_TensorRT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comfyanonymous%2FComfyUI_TensorRT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/comfyanonymous","download_url":"https://codeload.github.com/comfyanonymous/ComfyUI_TensorRT/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230367780,"owners_count":18215325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-19T03:01:27.626Z","updated_at":"2024-12-19T03:01:47.908Z","avatar_url":"https://github.com/comfyanonymous.png","language":"Python","funding_links":[],"categories":["Workflows (3395) sorted by GitHub Stars","All Workflows Sorted by GitHub Stars"],"sub_categories":[],"readme":"# TensorRT Node for ComfyUI\n\nThis node enables the best performance on NVIDIA RTX™ Graphics Cards\n (GPUs) for Stable Diffusion by leveraging NVIDIA TensorRT.\n\nSupports:\n\n- Stable Diffusion 1.5\n- Stable Diffusion 2.1\n- Stable Diffusion 3.0\n- SDXL\n- SDXL Turbo\n- Stable Video Diffusion\n- Stable Video Diffusion-XT \n- AuraFlow\n- Flux\n\nRequirements:\n\n- GeForce RTX™ or NVIDIA RTX™ GPU\n- For SDXL and SDXL Turbo, a GPU with 12 GB or more VRAM is recommended\n  for best performance due to its size and computational intensity.\n- For Stable Video Diffusion (SVD), a GPU with 16 GB or more VRAM is\n  recommended.\n- For Stable Video Diffusion-XT (SVD-XT), a GPU with 24 GB or more VRAM\n  is recommended.\n- For Flux more than 24GB vram is currently required.\n\n## Installing\n\nThe recommended way to install these nodes is to use the [ComfyUI Manager](https://github.com/ltdrdata/ComfyUI-Manager)\nto easily install them to your ComfyUI instance.\n\nYou can also manually install them by git cloning the repo to your ComfyUI/custom_nodes folder and installing the requirements like:\n\n```\ncd custom_nodes\ngit clone https://github.com/comfyanonymous/ComfyUI_TensorRT\ncd ComfyUI_TensorRT\npip install -r requirements.txt\n```\n\n## Description\n\nNVIDIA TensorRT allows you to optimize how you run an AI model for your\nspecific NVIDIA RTX GPU, unlocking the highest performance. To do this,\nwe need to generate a TensorRT engine specific to your GPU.\n\nYou have the option to build either dynamic or static TensorRT engines:\n\n- Dynamic engines support a range of resolutions and batch sizes,\n  specified by the min and max parameters. Best performance will occur\n  when using the optimal (opt) resolution and batch size, so specify opt\n  parameters for your most commonly used resolution and batch size.\n\n\u0026nbsp;\n\n- Static engines only support a single resolution and batch size. These\n  provide the same performance boost as the optimal settings for the\n  dynamic engines.\n\nNote: Most users will prefer dynamic engines, but static engines can be\nuseful if you use a specific resolution + batch size combination most of\nthe time. Static engines also require less VRAM; the wider the dynamic\nrange, the more VRAM will be consumed.\n\n## Instructions\n\nYou can find different workflows in the [workflows](workflows) folder of this repo.\nThese .json files can be loaded in ComfyUI.\n\n### Building A TensorRT Engine From a Checkpoint\n\n1.  Add a Load Checkpoint Node\n2.  Add either a Static Model TensorRT Conversion node or a Dynamic\n    Model TensorRT Conversion node to ComfyUI\n3.  ![](readme_images/image3.png)\n4.  Connect the Load Checkpoint Model output to the TensorRT Conversion\n    Node Model input.\n5.  ![](readme_images/image5.png)\n6.  ![](readme_images/image2.png)\n7.  To help identify the converted TensorRT model, provide a meaningful\n    filename prefix, add this filename after “tensorrt/”\n8.  ![](readme_images/image9.png)\n\n9.  Click on Queue Prompt to start building the TensorRT Engines\n10. ![](readme_images/image7.png)\n\n![](readme_images/image11.png)\n\nThe Model Conversion node will be highlighted while the TensorRT Engine\nis being built.\n\nAdditional information about the model conversion process can be seen in\nthe console.\n\n![](readme_images/image4.png)\n\nThe first time generating an engine for a checkpoint will take awhile.\nAdditional engines generated thereafter for the same checkpoint will be\nmuch faster. Generating engines can take anywhere from 3-10 minutes for\nthe image generation models and 10-25 minutes for SVD. SVD-XT is an\nextremely extensive model - engine build times may take up to an hour.\n\n------------------------------------------------------------------------\n\n### Accelerated Image Generation Using a TensorRT Engine\n\nTensorRT Engines are loaded using the TensorRT Loader node.\n\n![](readme_images/image1.png)\n\n## Common Issues/Limitations\n\nComfyUI TensorRT engines are not yet compatible with ControlNets or\nLoRAs. Compatibility will be enabled in a future update.\n\n1.  Add a TensorRT Loader node\n2.  Note, if a TensorRT Engine has been created during a ComfyUI\n    session, it will not show up in the TensorRT Loader until the\n    ComfyUI interface has been refreshed (F5 to refresh browser).\n3.  ![](readme_images/image6.png)\n4.  Select a TensorRT Engine from the unet_name dropdown\n5.  Dynamic Engines will use a filename format of:\n\n\u0026nbsp;\n\n1.  dyn-b-min-max-opt-h-min-max-opt-w-min-max-opt\n2.  dyn=dynamic, b=batch size, h=height, w=width\n\n\u0026nbsp;\n\n6.  Static Engine will use a filename format of:\n\n\u0026nbsp;\n\n1.  stat-b-opt-h-opt-w-opt\n2.  stat=static, b=batch size, h=height, w=width\n\n\u0026nbsp;\n\n7.  ![](readme_images/image8.png)\n8.  The model_type must match the model type of the TensorRT engine.\n9.  ![](readme_images/image10.png)\n10. The CLIP and VAE for the workflow will need to be utilized from the\n    original model checkpoint, the MODEL output from the TensorRT Loader\n    will be connected to the Sampler.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomfyanonymous%2FComfyUI_TensorRT","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomfyanonymous%2FComfyUI_TensorRT","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomfyanonymous%2FComfyUI_TensorRT/lists"}