TRT Upscaler
Your favorite 4x ESRGAN, compiled to run on NVIDIA Tensor Cores
- image
- upscaled_image
The TRT Upscaler node runs the exact same upscaling models you already know - 4x-UltraSharp, 4x_foolhardy_Remacri, any compatible .pth - but through an NVIDIA TensorRT engine instead of raw PyTorch. Same weights, same output pixels, Tensor Core inference. The point is not better quality, it's speed: roughly 2x on an RTX card with FP16.
So let's be clear about what this thing is in the upscaling hierarchy. "Upscaling" covers three unrelated jobs, and this node is the boring, valuable one: pure pixel interpolation. It adds no detail that wasn't in the source, it cannot hallucinate, and it never rewrites a face. That's a feature - when your source is already sharp and you just need more pixels, an ESRGAN model is the community's default for a reason, and this is that default running faster. The TRT wrapper doesn't move you up a quality rung; it makes the rung you're already on quicker. If you're after invented detail (SeedVR2 territory) this is the wrong tool entirely.
How it works
At startup the node scans models/upscale_models for .trt engine files and builds the model_name dropdown from them, stripping the _fp16/_fp32 suffix. If you see "No TRT models found" as the only choice, nothing has been compiled yet - that's the setup step, not a bug.
The mechanism is a compiled pipeline. The scale factor is read straight from the model name (4x → 4, 2x → 2, 8x → 8, default 4). It deserializes the engine once per run, caches it so repeats don't reload, then processes your batch image by image. Big images are tiled: it walks tile_size-sized tiles with tile_overlap between them, pads edge tiles up to 64px so the engine can handle them, runs each through CUDA buffers, then feather-blends the overlap regions and normalizes by a weight map so you don't see seam lines. That tiling is why it can take on huge images without blowing up VRAM.
The inputs that matter
There are only five, and three of them you'll actually touch:
- image - the IMAGE tensor in.
- model_name - the dropdown of compiled
.trtengines. - tile_size (64–2048, default 512) - smaller on a 6GB card, larger for speed on a 3090/4090. OOM? Drop this first.
- tile_overlap (0–256, default 32) - more overlap blends better but runs slower; 32 is a sane start.
- use_fp16 (default on) - ~2x faster, tiny quality loss. Note the trap: the node looks for a
_fp16.trtor_fp32.trtfile to match this toggle, so you need engines compiled for the precision you pick.
Output is a single upscaled_image IMAGE - feed it to a PreviewImage, SaveImage, or straight into the next stage of a multi-pass workflow.
Installing it - the fiddly part
Here's the thing the README is upfront about and everyone still gets burned by: TensorRT is not installed by the node. It's deliberately commented out of requirements.txt - you install it yourself from NVIDIA's developer download, matching your CUDA 11.8+. You also need pycuda. If the node won't import, ModuleNotFoundError: No module named 'tensorrt' is the canonical failure, and it's exactly what shows up in the wild after people install this class of node from ComfyUI Manager and expect it to just work.
The real flow:
cd ComfyUI/custom_nodes
git clone https://github.com/sugarkwork/comfyui-trtupscaler
cd comfyui-trtupscaler
pip install -r requirements.txt
That pulls torch, spandrel + spandrel-extra-arches (for model loading), onnx, numpy, pillow, requests, tqdm. Then models. On Windows, setup_models.bat downloads and converts 4x_foolhardy_Remacri or 4x-UltraSharp for you; on Linux it's manual:
python convert_model.py 4x-UltraSharp --models-dir ../../models/upscale_models
Conversion is .pth → ONNX (via spandrel) → TensorRT engine via trtexec with dynamic shapes. At builder optimization level 3 that can take minutes and look completely hung. It isn't - that's the "stuck" reports. Let it finish.
Hardware and the honest verdict
You need a Pascal-or-newer NVIDIA GPU (compute capability 6.0+), CUDA 11.8+, and TensorRT 8.6+. No NVIDIA card, no Tensor Cores, no point - just use a plain ESRGAN node.
Is it worth it? If you upscale constantly and have a Tensor Core GPU, yes - one fiddly install for 2x on every upscale pays off fast, especially in batch work. If you upscale occasionally, the stock ESRGAN nodes are free, instant, and already in your graph; the TRT setup cost isn't justified by a casual workflow. This is a speed tool for people who climb the pixel rung for a living, not a quality upgrade.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| model_name | COMBO | 1 options: No TRT models found | |
| tile_size | INT | 51264–2048 | Size of tiles for processing large images |
| tile_overlap | INT | 320–256 | Overlap between tiles to reduce seams |
| use_fp16 | BOOLEAN | true | Use FP16 precision (faster but may have slight quality loss) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| upscaled_image | IMAGE | — |