ComfyUI-Upscaler-Tensorrt

yuvraj108c更新放缓

用 TensorRT 加速 ComfyUI 的图片放大节点,把 ESRGAN、Real-ESRGAN 等放大模型跑出 2~4 倍速度,适合出图后处理提速。

2-4x faster ComfyUI Image Upscaling using Tensorrt ⚡

暂无版本252star46fork同步于 2026-11-07 07:30 UTC

怎么上手

由 README 提炼,执行前请确认
cd /ComfyUI/custom_nodes && git clone https://github.com/yuvraj108c/ComfyUI-Upscaler-Tensorrt.git
cd ./ComfyUI-Upscaler-Tensorrt && pip install -r requirements.txt
硬件要求按 README 说明

需 NVIDIA GPU 与 CUDA 环境,README 未给出具体显存要求;实测覆盖 RTX3060、RTX4090、RTX5090 及 L40S,未提及 CPU 运行。

需要 CUDA
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

把 ComfyUI 里的图片放大换成 TensorRT 引擎跑,比原生快 2-4 倍

用 TensorRT 加速 ComfyUI 的图片放大节点,把 ESRGAN、Real-ESRGAN 等放大模型跑出 2~4 倍速度,适合出图后处理提速。

核心能力

  • 用 TensorRT 构建 FP16 引擎加速 ESRGAN 放大
  • 引擎在首次使用时自动构建,无需手动转换
  • 支持 256x256 到 1280x1280 的动态输入分辨率
  • 内置 4x-UltraSharp、RealESRGAN 等十余个常用模型
  • 支持 1x/2x/任意倍率模型与自定义输出分辨率

容易踩的坑

升级 TensorRT 版本后必须重新构建已生成的引擎;目前仅支持 ESRGAN 架构的模型;输入图片分辨率需在 256-1280px 之间,否则会报错;把 .pth 导出为 .onnx 时内存占用很高。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    ComfyUI Upscaler TensorRT ⚡

    python cuda trt by-nc-sa/4.0

    This project provides a Tensorrt implementation for fast image upscaling using models inside ComfyUI (2-4x faster)

    Last tested: 07 June 2026 (ComfyUI v0.23.0 | Torch 2.12.0 | Python 3.12.3 | L40S | CUDA 13.0 | Ubuntu 24.04)

    ⭐ Support

    If you like my projects and wish to see updates and new features, please consider supporting me. It helps a lot!

    ComfyUI-Depth-Anything-Tensorrt ComfyUI-Upscaler-Tensorrt ComfyUI-Dwpose-Tensorrt ComfyUI-Rife-Tensorrt

    ComfyUI-Whisper ComfyUI_InvSR ComfyUI-Thera ComfyUI-Video-Depth-Anything ComfyUI-PiperTTS

    buy-me-coffees paypal-donation

    ⏱️ Performance

    Note: The following results were benchmarked on FP16 engines inside ComfyUI, using 100 identical frames

    DeviceModelInput Resolution (WxH)Output Resolution (WxH)FPS
    RTX50904x-UltraSharp512 x 5122048 x 204812.7
    RTX50904x-UltraSharp1280 x 12805120 x 51202.0
    RTX40904x-UltraSharp512 x 5122048 x 20486.7
    RTX40904x-UltraSharp1280 x 12805120 x 51201.1
    RTX30604x-UltraSharp512 x 5122048 x 20482.2
    RTX30604x-UltraSharp1280 x 12805120 x 51200.35

    🚀 Installation

    • Install via the manager
    • Or, navigate to the /ComfyUI/custom_nodes directory
    git clone https://github.com/yuvraj108c/ComfyUI-Upscaler-Tensorrt.git
    cd ./ComfyUI-Upscaler-Tensorrt
    pip install -r requirements.txt
    

    Optionally, you can install and use TensorRT-RTX

    pip install tensorrt-rtx 
    

    🛠️ Supported Models

    ☀️ Usage

    • Load example workflow
    • Choose the appropriate model from the dropdown
    • The tensorrt engine will be built automatically
    • Load an image of resolution between 256-1280px
    • Set resize_to to resize the upscaled images to fixed or custom resolutions

    🔧 Custom Models

    • To export other ESRGAN models, you'll have to build the onnx model first, using export_onnx.py
    • Place the onnx model in /ComfyUI/models/onnx/YOUR_MODEL.onnx
    • Then, add your model to this list load_upscaler_config.json
    • Finally, run the same workflow and choose your model
    • If you've tested another working tensorrt model, let me know to add it officially to this node

    🚨 Updates

    07 June 2026

    12 January 2026

    • Add more resizing scale factors
    • Add custom resolution resizing

    27 August 2025

    • Support 4x-UltraSharpV2_Lite, 4x_UniversalUpscalerV2-Neutral_115000_swaG, 4x-ClearRealityV1
    • Load models from config PR#57 by @NeoAnthropocene

    30 April 2025

    4 March 2025 (breaking)

    • Automatic tensorrt engines are built from the workflow itself, to simplify the process for non-technical people
    • Separate model loading and tensorrt processing into different nodes
    • Optimise post processing
    • Update onnx export script

    ⚠️ Known issues

    • If you upgrade tensorrt version, you'll have to rebuild the engines
    • Only models with ESRGAN architecture are currently working
    • High ram usage when exporting .pth to .onnx

    🤖 Environment tested

    • Ubuntu 24.04, Debian 12
    • Windows 11

    👏 Credits

    License

    Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)